I am trying to show a app chooser dialog using Intent.createChooser, that will list all available web browsers in user's phone. I'm using the code below:
Intent browserIntent = new Intent(Intent.ACTION_VIEW);
browserIntent.setData(Uri.parse(category));
// Create and start the chooser
Intent chooser = Intent.createChooser(browserIntent, "Open with...");
pIntent = PendingIntent.getActivity(helperMethodContext, 0, chooser, PendingIntent.FLAG_UPDATE_CURRENT);
Log.d("HelperMethods: ", "video chat url: " + category);
I am testing this on android 6. My phone has 3 browsers, default browser, chrome and firefox. When i run it and click on the link(the notification), app chooser dialog opens but only shows default browser. It doesn't show chrome or firefox.
I have checked default apps settings in my phone and there is no default browser. When i click default browser it opens with an app chooser dialog showing all the browser apps i have installed on my phone.
Pls can someone tell me where am i going wrong.