Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

programmatically detect whether a Browser is installed on Android

how to check whether browser is installed on android device

I need to check whether browser is installed on a device or not.how can we do that

like image 960
1234567 Avatar asked Oct 17 '25 15:10

1234567


1 Answers

You can check whether an intent to go to a web page can be resolved:

public Boolean isBrowserInstalled() {
    String url = "https://stackoverflow.com";
    Uri webAddress = Uri.parse(url);
    Intent intentWeb = new Intent(Intent.ACTION_VIEW, webAddress);
    return (intentWeb.resolveActivity(getPackageManager()) != null);
}