manju
manju

Reputation: 847

How to launch email client from my app in such a manner that I could see inbox, sent items etc

When I launch email client from my application, a compose window of email client gets opened but when I launch like this, I am unable to see inbox, sent items etc...

In short how to launch email client from app exactly like launching from desktop?

Any suggestions will be appreciated.

Upvotes: 2

Views: 1131

Answers (3)

Corneliu Dascălu
Corneliu Dascălu

Reputation: 3958

Just in case anyone else gets here with the same question, there is a solution.

Intent intent = new Intent("android.intent.action.MAIN");
intent.setComponent(ComponentName.unflattenFromString("com.google.android.email/com.android.email.activity.Welcome"));
intent.addCategory("android.intent.category.LAUNCHER");
startActivity(intent);

You can get the component name from LogCat. The only problem is, I think, if the user uses another application for email.

Upvotes: -1

samer alameer
samer alameer

Reputation: 27

you can try this from your activity object:

it will not necessarily take you to the Inbox directly but it will open the email application:

Intent intent = getPackageManager().getLaunchIntentForPackage("com.android.email");
startActivity(intent);

Samer Alameer

Upvotes: -1

CommonsWare
CommonsWare

Reputation: 1007218

in short how to launch email client from app exactly like launching from desktop..

There is no standard Intent for this, sorry.

Upvotes: 3

Related Questions