Tuesday, April 23, 2013

Re: [android-developers] Re: Send Email in Android

becoz you run you test on emulator as I think or on a mobile that doesn't have a mail program, but you always could handle this issue buy detecting if a mobile support your intent or not.

Islam AbdelMageed
Java\EE Developer
International Turnkey Systems ( Cairo - Egypt)


2013/4/23 bob <bob@coolfone.comze.com>

On a Nexus 7, I stuck your code in the onCreate method of a new test app, and it opened up Gmail:




I guess you don't have Gmail?


Thanks.



On Tuesday, April 23, 2013 12:18:48 AM UTC-5, amira2...@gmail.com wrote:
Hello
           i have a simple program that send an email when you press a button button i get an alert that  No application can perform this action .

                Intent emailIntent = new Intent(android.content.Intent.ACTION_SEND);
                emailIntent.setType("plain/text"); 
                emailIntent.putExtra(android.content.Intent.EXTRA_EMAIL, new String[]{"ayra...@yahoo.com"}); 
                emailIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, "Hello, MOTO!"); 
                emailIntent.putExtra(android.content.Intent.EXTRA_TEXT, "Hello, MOTO!"); 

                startActivity(Intent.createChooser(emailIntent, "Send mail..."));// To use these Internet methods, AndroidManifest.xml must have the following permission:
               
Thanks so much for help

--
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
---
You received this message because you are subscribed to the Google Groups "Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

--
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
---
You received this message because you are subscribed to the Google Groups "Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

No comments:

Post a Comment