Harshit Dubey
Harshit Dubey

Reputation: 121

Open a URL in opera mini browser

I've been trying to find out how to create an intent that will open the specified URL in opera mini browser and i have opera mini browser installed on my android device.

Upvotes: 2

Views: 1929

Answers (1)

CommonsWare
CommonsWare

Reputation: 1006674

startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(...)));

where ... is the URL you wish to navigate to.

If Opera Mini is your default browser, or if you do not have a default browser, this can open in Opera Mini.

If you want to force the user to choose a browser, rather than use a default, use:

startActivity(createChooser(new Intent(Intent.ACTION_VIEW, Uri.parse(...)), 'Pick a Browser'));

Upvotes: 7

Related Questions