final String[] columns = { Browser.BookmarkColumns.TITLE, Browser.BookmarkColumns.URL };
Cursor query = getContentResolver().query(Browser.BOOKMARKS_URI,columns, null, null, null);
query.moveToFirst();
while (query.moveToNext()) {
String title = query.getString(query.getColumnIndex(Browser.BookmarkColumns.TITLE));
String url = query.getString(query.getColumnIndex(Browser.BookmarkColumns.URL));
Log.d("msg"," d "+title+" d "+url);
urlArray.add(url);
}
final String[] columns = { Browser.BookmarkColumns.TITLE, Browser.BookmarkColumns.URL };
Cursor query = getContentResolver().query(Browser.BOOKMARKS_URI,columns, null, null, null);
query.moveToFirst();
while (query.moveToNext()) {
String title = query.getString(query.getColumnIndex(Browser.BookmarkColumns.TITLE));
String url = query.getString(query.getColumnIndex(Browser.BookmarkColumns.URL));
Log.d("msg"," d "+title+" d "+url);
urlArray.add(url);
}
我已经使用了这段代码,但是这段代码给了我浏览器历史记录,我想只得到书签页面网址。