1

A can get all installed web browsers by using this code:

ArrayList<String> allLaunchers = new ArrayList<String>();

Intent allApps = new Intent(Intent.ACTION_MAIN);
List<ResolveInfo> allAppList = getPackageManager().queryIntentActivities(allApps, 0);
for(int i =0;i<allAppList.size();i++) allLaunchers.add(allAppList.get(i).activityInfo.packageName);

Intent myApps = new Intent(Intent.ACTION_VIEW);
       myApps.setData(Uri.parse("http://www.google.es"));
List<ResolveInfo> myAppList = getPackageManager().queryIntentActivities(myApps, 0);
for(int i =0;i<myAppList.size();i++){
    if(allLaunchers.contains(myAppList.get(i).activityInfo.packageName)){
        Log.e("match",myAppList.get(i).activityInfo.packageName+"");
    }
}

link: Android Fetch installed and default browser in device

Based on package name, is there a way to get BOOKMARKS URI for each browser?

When I got list of browsers, by package name (via above method), I need to get a link for it's bookmarks (browsing history) database, for example:

On Chrome, package name is com.android.chrome and history URI is content://com.android.chrome.browser/bookmarks, but this case is special one, when only .browser was added to real package name... in most cases it differs totally. Like in FF, where package name is org.mozilla.firefox, and history uri differs: content://org.mozilla.firefox.db.browser/bookmarks (yes, I know that It can't be read in FF), but was only an example.

So basically the question is: Is there a way, knowing this: org.mozilla.firefox, to get this: content://org.mozilla.firefox.db.browser/bookmarks.

Community
  • 1
  • 1
Tomk
  • 103
  • 1
  • 8
  • Can you please explain you're problem? You are talking about a list of installed webbrowsers and then about a BOOKMARLS_URI (History). What is is that you want to get exactly? – tim687 Jan 29 '15 at 16:50
  • I want to scan history in all installed browsers, if it is allowed. I know that most most browser uri is something like content://*package name*.browser/bookmark. Just wanted to know is there a more reliable way of getting this info – Tomk Jan 29 '15 at 17:13

0 Answers0