How to start the mail client from my application so that I can see incoming, sent items, etc.

When I start the mail client from my application, the window for creating the mail client opens, but when I start it, I can not see the incoming, sent items, etc.

In short, how to start the mail client from the application in the same way as starting from the desktop?

Any suggestions would be appreciated.

+2
source share
3 answers

in short, how to start the mail client from the application is the same as starting from the desktop.

There is no standard intention for this, sorry.

+3
source

you can try this from your activity object:

it will not necessarily lead you directly to the inbox, but it will open the email application:

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

Samer Alamer

-1
source

Just in case, if someone 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, I think, is if the user is using another email application.

-1
source

All Articles