Skip to content

Instantly share code, notes, and snippets.

@x011
Forked from mrfanatic/gist:842d2ab16c1a065bc3c7
Last active August 29, 2015 14:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save x011/13fc221a7032f5fc4b1c to your computer and use it in GitHub Desktop.
Save x011/13fc221a7032f5fc4b1c to your computer and use it in GitHub Desktop.
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