Bu konuda yeniyim, fakat kod snippet'ımın nesi yanlış? Hatayı alıyorum: Bağlantıyı seçtiğimde 'Bu eylem şu anda desteklenmiyor'.Mailto Android: 'Desteklenmeyen eylem' hatası
public void addEmail() {
TextView txt = (TextView) findViewById(R.id.emailtext);
txt.setOnClickListener(new View.OnClickListener(){
public void onClick(View v){
Intent intent = new Intent();
String uriText =
"mailto:[email protected]" +
"?subject=" + URLEncoder.encode("some subject text here") +
"&body=" + URLEncoder.encode("some text here");
Uri uri = Uri.parse(uriText);
Intent sendIntent = new Intent(Intent.ACTION_SENDTO);
sendIntent.setData(uri);
startActivity(Intent.createChooser(sendIntent, "Send email"));
}});
}
Çok teşekkürler: İşte benim kodudur!
@see https://stackoverflow.com/questions/2197741/how-can-i-send-emails-from-:
Bu kodu kullanarak niyet başlatmaya çalışırken önce bu algılayabilir my-android-application – shkschneider
@shkschneider, bu hataya nasıl hitap ediyor? – Sam
Android e-posta istemcisinde henüz bir e-posta hesabı kurmamışken Android 4.0.2 öykünücüsünde buna rastladım. İstemcide bir hesap oluşturmak problemin etrafında çalıştı. – Sam