Created
February 20, 2015 20:19
-
-
Save mrfanatic/842d2ab16c1a065bc3c7 to your computer and use it in GitHub Desktop.
Android intent to open the stock 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
String packageName = "com.android.browser"; | |
String className = "com.android.browser.BrowserActivity"; | |
Intent intent = new Intent(Intent.ACTION_VIEW); | |
intent.addCategory(Intent.CATEGORY_LAUNCHER); | |
intent.setClassName(packageName, className); | |
intent.setData(Uri.parse("https://google.com")); | |
startActivity(intent); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment