저는이 기능을 처음 사용하고 있지만 코딩 방법에 문제가 있습니까? 링크를 선택하면 '이 작업은 현재 지원되지 않습니다.'라는 오류가 나타납니다. 내 코드는 다음과 같습니다.Mailto Android : '지원되지 않는 작업'오류
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"));
}});
}
많은 감사!
@see https://stackoverflow.com/questions/2197741/how-can-i-send-emails-from- :
이 코드를 사용하여 의도를 시작하기 전에이를 감지 할 수 있습니다 내 안드로이드 응용 프로그램 – shkschneider
@ shkschneider, 어떻게 그 오류를 해결합니까? – Sam
Android 전자 메일 클라이언트에서 아직 전자 메일 계정을 설정하지 않았을 때 Android 4.0.2 에뮬레이터에서이 문제가 발생했습니다. 클라이언트에서 계정을 설정하면 문제가 해결되었습니다. – Sam