I am starting Email client using intent from my activity (Either native email or gmail). I just want to get notified into my activity when user presses send button or discards the email. I just want to start another activity when user press send button and want to show a dialog when user discards the email.
Here is my code
Intent emailIntent = new Intent(Intent.ACTION_SEND_MULTIPLE);
emailIntent.setType("message/rfc822");
emailIntent.putExtra(Intent.EXTRA_EMAIL, new String[] {"email@something.com"});
emailIntent.putExtra(Intent.EXTRA_SUBJECT, "Test Mail");
emailIntent.putExtra(Intent.EXTRA_TEXT, "Test Mail Subject");
startActivityForResult(emailIntent, REQ_CODE);
public void onActivityResult(int requestCode, int resultCode,
Intent data) {
if(requestCode == REQ_CODE){
Toast.makeText(getApplicationContext(), "resultCode "+resultCode, Toast.LENGTH_LONG).show();
//if(resultCode == RESULT_OK){
//}
}
}
Thanks in Advance..