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

前端 未结 3 1111
野趣味
野趣味 2021-01-15 12:02

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...

相关标签:
3条回答
  • 2021-01-15 12:52

    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.

    0 讨论(0)
  • 2021-01-15 12:55

    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

    0 讨论(0)
  • 2021-01-15 13:01

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

    There is no standard Intent for this, sorry.

    0 讨论(0)
提交回复
热议问题