How do I list / check all browsers installed on an Android device via Java?
How do I list / check all browsers installed on an Android device via Java?
It is impossible to know / determine which applications are of the Browser type, for the simple reason that there is no identifier informing this for Android. It is also very risky to look for all packages that have browser
, for example.
One suggestion is that you can list, for example, which Activity
's can open a certain Intent
with a URL:
PackageManager packageManager = context.getPackageManager();
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setData(Uri.parse("http://www.google.com"));
List<ResolveInfo> list = packageManager.queryIntentActivities(intent,
PackageManager.MATCH_DEFAULT_ONLY);
for (ResolveInfo info : list) {
String name = info.name;
}