Android intent Example


To Open Page

Intent intent = new Intent(MainActivity.this, SecondActivity.class);
startActivity(intent);


To Open Email
Intent send_mail = new Intent(Intent.ACTION_VIEW, Uri.parse("mailto:example@gmail.com"));
startActivity(send_mail);


To Open App
Intent launch = getPackageManager().getLaunchIntentForPackage("com.my.project");
if (launch != null) {
startActivity(launchIntent); }