If you don't pass the correct web URL and don't have a browser, ActivityNotFoundException occurs, so check those requirements or handle the exception explicitly. That can resolve your problem.
public static void openWebPage(Context context, String url) {
try {
if (!URLUtil.isValidUrl(url)) {
Toast.makeText(context, " This is not a valid link", Toast.LENGTH_LONG).show();
} else {
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setData(Uri.parse(url));
context.startActivity(intent);
}
} catch (ActivityNotFoundException e) {
Toast.makeText(context, " You don't have any browser to open web page", Toast.LENGTH_LONG).show();
}
}