Is there a way to programically open email client, without a need to forcing message send? I just want the app to let user open his email client for email checking purposes :)
Intent intent = new Intent(Intent.ACTION_SEND);
intent.setType("message/rfc822");
startActivity(Intent.createChooser(intent, ""));
This code works but it forces user to send a new message.
This code will show a dialog with a list of email clients. Clicking one will launch the application:
I think you should replace
Intent.ACTION_SEND
toIntent.ACTION_VIEW
,i am sure this will work as this will prompt with list of application which support MIME type
"message/rfc822"
so it will include your default email client in your device other than gmail app.How about this code:
In Kotlin, but this version creates a chooser for user to pick which email app to use. You basically do what Oved does in his answer, except create an actual chooser using
LabeledIntent
... then later call it with
or handle null however you want.
That kinda worked. But it opend Gmail for me, even since I have other email clients