无法获取SAMSUNG S4本机浏览器历史记录 [英] Not able to get SAMSUNG S4 native browser history
本文介绍了无法获取SAMSUNG S4本机浏览器历史记录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在从设备本机浏览器访问浏览器历史记录.我使用以下代码-
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");
它在所有设备上都能正常工作,但在SAMSUNG S4中,Cursor返回null. 我发现在我得到正确响应的设备中,浏览器程序包是"com.android.browser",而在S4设备中,它是"com.sec.android.app.sbrowser".那是问题吗?但这是三星S4中的本机浏览器.
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.
谢谢.
推荐答案
尝试一下-
Uri uri = Uri.parse("content://com.sec.android.app.sbrowser.browser/history");
而不是Browser.BOOKMARKS_URI
.
这篇关于无法获取SAMSUNG S4本机浏览器历史记录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文