Import bookmarks from the stock Android Browser

RESOLVED DUPLICATE of bug 710330

Status

()

enhancement
RESOLVED DUPLICATE of bug 710330
9 years ago
3 years ago

People

(Reporter: mbrubeck, Unassigned)

Tracking

(Blocks 1 bug, {conversion, mobile})

Trunk
Firefox 11
All
Android
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Users migrating to Fennec should be able to import their bookmarks from the default "Browser" app on Android.
This code might be useful (it works for me):

// retrieve and log bookmarks
Cursor results;
String[] proj = new String[]
{
  android.provider.BaseColumns._ID,
  android.provider.Browser.BookmarkColumns.URL,
  android.provider.Browser.BookmarkColumns.TITLE
};
// other columns available: http://developer.android.com/reference/android/provider/Browser.BookmarkColumns.html
results = managedQuery(android.provider.Browser.BOOKMARKS_URI, proj, 
    android.provider.Browser.BookmarkColumns.BOOKMARK, null, null);
int urlColumn= results.getColumnIndex(android.provider.Browser.BookmarkColumns.URL);
int titleColumn= results.getColumnIndex(android.provider.Browser.BookmarkColumns.TITLE);
String tag = "mytag";
if (results.moveToFirst()) {
  do {
    Log.d(tag, results.getString(titleColumn)+": "+results.getString(urlColumn));
  } while (results.moveToNext());
}
Component: Bookmarks → General
Product: Fennec → Fennec Native
QA Contact: bookmarks → general
Target Milestone: --- → Firefox 11
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 710330
You need to log in before you can comment on or make changes to this bug.