Created
October 21, 2020 09:47
-
-
Save nadar71/55690d81fc11999585293a3d6c1b31a9 to your computer and use it in GitHub Desktop.
open url in browser
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// open url in browser | |
fun openUrlInBrowser(urlToOpen: String, view: View, context: Context, options: Bundle?) { | |
val intent = Intent(Intent.ACTION_VIEW) | |
intent.data = Uri.parse(urlToOpen) | |
startActivity(context,intent,options) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment