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.
An intent is to perform an action on the screen. It is mostly used to start activity, send broadcast receiver,start services and send message between two activities. There are two intents available in android as Implicit Intents and Explicit Intents. Here is a sample example to start new activity with old activity.
When you construct an intent, you must specify the action you want the intent to perform. Android uses the action ACTION_SEND to send data from one activity to another, even across process boundaries. You need to specify the data and its type.
Intent intent = new Intent(Intent.ACTION_MAIN); intent.addCategory(Intent.CATEGORY_APP_EMAIL); startActivity(intent); startActivity(Intent.createChooser(intent, getString(R.string.ChoseEmailClient)));
That kinda worked. But it opend Gmail for me, even since I have other email clients
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With