Question

in my android application I have some buttons that launch the native browser to show the user e.g. the HELP section on my website.

Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("http://www.xy.com/help"));
startActivity(browserIntent);

So when the user presses the button the browser is launched. But I want a dialog to appear where the user is asked which application he wants to use to view the website.

Is this possible. How would I achieve this?

Was it helpful?

Solution

In Android, your apps gives the Intent and the OS handles the application selection. If multiple applications are set to handle an http action view intent, then the OS will automatically give the user their options unless they have defined a default.

As far as I know, you can not (or should not) override this behavior.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top