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

前端 未结 3 1153
野趣味
野趣味 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.

提交回复
热议问题