January 2018
Intermediate to advanced
434 pages
14h 1m
English
Now, let's see how to launch a browser using an intent.
Anko provides a browse function, which takes in the web address and launches the browser on your device. If you have multiple browsers, it will show you some options to select it. Here's an example:
browse("http://www.google.com")
The web address you put in the parameter needs to have http:// or https:// as the prefix, otherwise it will throw an ActivityNotFound exception.
Read now
Unlock full access