Reputation: 5540
How can I open mail client from my app, NOT SENDING EMAIL just open the inbox? when I use
Intent intent = new Intent(Intent.ACTION_VIEW);
Uri data = Uri.parse("mailto:[email protected]?subject=" + "" + "&body=" + "");
intent.setData(data);
startActivity(intent);
It opens the send mail view, and I want to open the inbox.
Upvotes: 5
Views: 4370
Reputation: 776
You can just use in your xml, like this:
android:autoLink="email"
Upvotes: 0
Reputation: 5540
From @CommonsWare answer
This is what worked for me:
Intent intent=Intent.makeMainSelectorActivity(Intent.ACTION_MAIN, Intent.CATEGORY_APP_EMAIL);
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);//Min SDK 15
startActivity(intent);
Upvotes: 18