title: How to use browser content provider?
body: <p>I have written this simple code to get the bookmarks from the browser:</p>
  
  <pre><code>public class BroswerProviderActivity extends ListActivity {
  
      public void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.main);
  
          Cursor cursor = getContentResolver().query(Browser.BOOKMARKS_URI, null, null, null, null);
  
          String s[] = new String[]{
                  Browser.BookmarkColumns.BOOKMARK,
                  Browser.BookmarkColumns.TITLE};
          int view[] = new int[]{
                  R.id.Bookmark, R.id.title};
  
          SimpleCursorAdapter adapter = new SimpleCursorAdapter(this, R.layout.main, cursor, s, view);
  
          this.setListAdapter(adapter);
      }
  }
  </code></pre>
  
  <p>I also added the permissions in the manifest file:</p>
  
  <pre><code>&lt;uses-permission android:name="com.android.browser.permission.READ_HISTORY_BOOKMARKS"&gt;
  </code></pre>
  
  <p>But when i am running this app, it is not working. It displays some error and asks to Force Stop the application. What is the problem with this? please help me out. Thank you</p>
  
  <p>Here is the exception i am getting from the LogCat window. But this is unrelated:<img src="https://i.stack.imgur.com/R53Ko.png" alt="enter image description here"></p>
  
  <p>Here is the xml file that i wrote:</p>
  
  <pre><code>&lt;ListView android:transcriptMode="normal" android:id="@+id/list"     android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_weight="1.0"&gt;&lt;/ListView&gt;
   &lt;TextView android:text="TextView" android:id="@+id/bookmark" android:layout_width="wrap_content" android:layout_height="wrap_content"&gt;&lt;/TextView&gt;
   &lt;TextView android:text="TextView" android:id="@+id/title" android:layout_width="wrap_content" android:layout_height="wrap_content"&gt;&lt;/TextView&gt;
  </code></pre>