How to find default browser set on android device

This code may help you:

Intent browserIntent = new Intent("android.intent.action.VIEW", Uri.parse("http://"));  
ResolveInfo resolveInfo = getPackageManager().resolveActivity(browserIntent,PackageManager.MATCH_DEFAULT_ONLY);

// This is the default browser's packageName
String packageName = resolveInfo.activityInfo.packageName;

and if wanna start it, do as follows:

startActivity(getPackageManager().getLaunchIntentForPackage(packageName));

Leave a Comment