This question already has an answer here:
I'm just wondering how to fire up an Intent to the phone's browser to open an specific URL and display it.
Can someone please give me a hint?
This question already has an answer here:
I'm just wondering how to fire up an Intent to the phone's browser to open an specific URL and display it.
Can someone please give me a hint?
The short version
should work as well...
To open a URL/website you do the following:
Here's the documentation of
Intent.ACTION_VIEW
.Source: Opening a URL in Android's web browser from within application
You can use the geo
URI
prefix:I have found that if I pass a URL containing the coords to the browser, Android asks if I want the browser or the Maps app, as long as the user hasn't chosen the browser as the default. See my answer here for more info on the formating of the URL.
I guess if you used an intent to launch the Maps App with the coords, that would work also.
From XML
In case if you have the web-address/URL displayed on your view and you want it to make it clikable and direct user to particular website You can use:
In same way you can use different attributes of autoLink(email, phone, map, all) to accomplish your task...
Use following snippet in your code
Use This link