onClick open browser with given URL
Output :
// on click its open in browser with url = http://www.google.com
Intent intent = new Intent(Intent.ACTION_VIEW,
Uri.parse("http://www.google.com"));
intent.setComponent(new ComponentName("com.android.browser",
"com.android.browser.BrowserActivity"));
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
getApplicationContext().startActivity(intent);
No comments:
Post a Comment