Not able to get SAMSUNG S4 native browser history

自作多情 提交于 2019-12-06 05:13:56

问题


I am accessing the browser history from device native browser. I use following code -

Cursor cur = getContentResolver().query(Browser.BOOKMARKS_URI,
            new String[] { Browser.BookmarkColumns.URL }, null, null,
            BookmarkColumns.DATE + " DESC");

It works fine in all devices, but in SAMSUNG S4 Cursor returns null. I find that in devices where i get proper response, Browser package is 'com.android.browser' but in S4 device it is 'com.sec.android.app.sbrowser'. Is that the issue? But this is native browser in Samsung S4.

Thanks in advance.


回答1:


Try this-

Uri uri = Uri.parse("content://com.sec.android.app.sbrowser.browser/history"); instead of Browser.BOOKMARKS_URI.



来源:https://stackoverflow.com/questions/20370108/not-able-to-get-samsung-s4-native-browser-history

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!