I am trying to use the native email compose in android apps on my table to send me logs when the apps crashes.
The code below works great but the Native Email compose pops up and you have to press send. Is there a way to tell the compose app just to send the email. Send it a click without having to manually do it?
Intent intent = new Intent(Intent.ACTION_SENDTO); // it's not ACTION_SEND
intent.setType("message/rfc822");
intent.setType("text/plain");
intent.putExtra(Intent.EXTRA_SUBJECT, "Subject of email");
intent.putExtra(Intent.EXTRA_TEXT, "Body of email");
intent.setData(Uri.parse("myeamil@yahoo.com")); // or just "mailto:" for blank
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); // this will make such that when user returns to your app, your app is displayed, instead of the email app.
//startActivity(intent);
Thanks. Max