Hello, have you solved this problem or not? I am also interested in this
too. Thanks
On Wednesday, September 2, 2009 10:35:40 PM UTC-5, ni wrote:
>
> Hi All,
>
> I mean, I want to pull out web histroy from content provider for my
> application.
>
>
>
> I have some coding. But I got exception so, no running.
>
> So, how can I do ?please help me.
> Here are my coding
> package com.app.browser;
>
>
> import android.app.ListActivity;
> import android.database.Cursor;
> import android.os.Bundle;
> import android.widget.ListAdapter;
> import android.widget.SimpleCursorAdapter;
>
>
>
> public class BrowserApp extends ListActivity {
> /** Called when the activity is first created. */
> @Override
> public void onCreate(Bundle savedInstanceState) {
> super.onCreate(savedInstanceState);
> setContentView(R.layout.list_activity_view);
> //Cursor browserinfo=android.provider.Browser.getAllVisitedUrls
> (getContentResolver());
>
> String []proj= new String []
> {android.provider.Browser.SearchColumns._ID,
> android.provider.Browser.SearchColumns.DATE,
> android.provider.Browser.SearchColumns.SEARCH};
> Cursor results=
> managedQuery
> (android.provider.Browser.SEARCHES_URI,proj,null,null,
> android.provider.Browser.SearchColumns.URL+" ASC");
>
> ListAdapter adapter = new SimpleCursorAdapter(
> this, // Context.
> android.R.layout.two_line_list_item, // Specify the
> row template to use (here, two columns bound to the two retrieved
> cursor rows).
> results, // Pass in
> the cursor to bind to.
> proj, // Array of cursor columns to bind to.
> new int[0]); //
> Parallel array of which template objects to bind to those columns.
>
> // Bind to our new adapter.
> setListAdapter(adapter);
>
> }
> }
>
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en