Hi all, it's the firt stime I write in this mailing list. I hope you
can help me :-)
I'm building an application that requires a "Contact me" button, but i
have a problem when the "Choose Application for sending mail" pops up.
It shows me a lot of Apps that I don't need: Bluetooth/Documents/
Dropbox/Gmail/SMS. I only need applications that can send mail, GMail,
Email or K9Mail.
I see that it's a common problem and i hope you have a solution that i
didn't find.
This is the part of code that i use:
final Button button3 = (Button) findViewById(R.id.button3);
button3.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
Intent i = new Intent(Intent.ACTION_SEND);
i.setType("text/plain");
i.putExtra(Intent.EXTRA_EMAIL , new
String[]{"info@***.com"});
i.putExtra(Intent.EXTRA_SUBJECT,
"Informazioni");
try {
startActivity(Intent.createChooser(i,
"Invia una mail
utilizzando:"));
} catch
(android.content.ActivityNotFoundException ex) {
Toast.makeText(CastelloQuistiniActivity.this, "There are no
email clients installed.", Toast.LENGTH_SHORT).show();
}
}
});
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en