Is there any URI which can point to the GMAIL App in android and help me launch it?
Use this: Intent intent = getPackageManager(). getLaunchIntentForPackage("com.google.android.gm"); startActivity(intent);
From the Home screen, tap the Apps icon (in the QuickTap bar) > the Apps tab (if necessary) > Google folder > Gmail or tap Google folder > Gmail on the Home screen.
Google Mobile Services (GMS) is a collection of Google applications and APIs that help support functionality across devices. These apps work together seamlessly to ensure your device provides a great user experience right out of the box.
This works to intent just the gmail app.
final Intent intent = new Intent(Intent.ACTION_VIEW)
.setType("plain/text")
.setData(Uri.parse("[email protected]"))
.setClassName("com.google.android.gm", "com.google.android.gm.ComposeActivityGmail")
.putExtra(Intent.EXTRA_EMAIL, new String[]{"[email protected]"})
.putExtra(Intent.EXTRA_SUBJECT, "test")
.putExtra(Intent.EXTRA_TEXT, "hello. this is a message sent from my demo app :-)");
startActivity(intent);
use for plenty of emails:
intent.putExtra(Intent.EXTRA_EMAIL, new String[] { "[email protected]" });
for single emails:
intent.setData(Uri.parse("[email protected]"));
You may add extra putExtra(Intent.EXTRA..)
and change the setType
for your purpose. :P
Update (1/22/14): It is important to note that if you are going to use this code, you check to make sure that the user has the package "com.google.android.gm" installed on their device. In any language, make sure to check for null on specific Strings and initializations.
Please see Launch an application from another application on Android
I'm using this in my apps:
Intent mailClient = new Intent(Intent.ACTION_VIEW);
mailClient.setClassName("com.google.android.gm", "com.google.android.gm.ConversationListActivity");
startActivity(mailClient);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With