Toast After E-mail Been Sent In Android
I've been trying for a long time to get an alert, like the toast, to come up after the user has clicked on send button, and the e-mail has been sent. My code seem to be correct, bu
Solution 1:
Sorry, you might need to find something else, but I don't believe you'll be able to make this work. As far as I can tell the default Android email programs (Gmail, Email) typically return prior to the actual transmission of the email, and in any case generally do not communicate using the onActivityResult pattern.
Solution 2:
try this ..
if(requestCode==1 && resultCode==Activity.RESULT_OK)
{
Toast.makeText(Activity, "Mail sent.",
Toast.LENGTH_SHORT).show();
}
else if (requestCode==1 && resultCode==Activity.RESULT_CANCELED)
{
Toast.makeText(Activity, "Mail canceled.",
Toast.LENGTH_SHORT).show();
}
else
{
Toast.makeText(Activity, "Plz try again.",
Toast.LENGTH_SHORT).show();
}
Post a Comment for "Toast After E-mail Been Sent In Android"