在Android中获取浏览器历史记录

问题描述:

朋友,

我的应用程序需要从Android手机访问浏览器历史记录?我该如何访问..

请帮助我....

Hi Friends,

my app need to access browser histories from a android phone?? how can i access it..

pls help me....

我解决了.

i solved.

Cursor mycur = managedQuery(Browser.BOOKMARKS_URI, Browser.HISTORY_PROJECTION, null, null, null);
        int count = mycur.getCount();
        mycur.moveToFirst();
        if(mycur.moveToFirst() && count>0)
        {
            while(count>0)
            {
                Log.e("title",mycur.getString(Browser.HISTORY_PROJECTION_URL_INDEX));
            //  histories[j]=mycur.getString(Browser.HISTORY_PROJECTION_TITLE_INDEX);
                j++;
                count--;
                mycur.moveToNext();
            }
        }


查看以下讨论是否有帮助: Android读取浏览器历史记录Android读取浏览器历史记录 [ ^ ]
See if the following discussion help: Android read browser historyAndroid read browser history[^]


请参阅..
http://androidcodeexamples.blogspot.com/2012/06/how-to-get-browser-history-in-android.html [
See it..
http://androidcodeexamples.blogspot.com/2012/06/how-to-get-browser-history-in-android.html[^]