2013-06-28 2 views
1

JQM을 사용하는 모바일 사이트에서 작업하고 있으며 Android 버전 4 이상에서 본문 텍스트를 설정하는 데 문제가 있습니다. 주소와 주제가 있습니다.mailto가 android jellybean과 함께 작동하지 않습니다

이것은 코드입니다.

var shareEmail = "mailto:"+thisAddress+"?&subject=" + encodeURIComponent(+thisSubject) + "&body=" + encodeURIComponent(thisBody); 

이전 버전에서는 정상적으로 작동합니다.

제안 사항.

답변

0

과 같이 그 일을 시도, 나를 위해 잘 작동 :)

Intent i = new Intent(Intent.ACTION_SEND); 
     i.setType("message/rfc822"); 
     i.putExtra(Intent.EXTRA_EMAIL , new String[]{"EMAIL ADRESS"}); 
     i.putExtra(Intent.EXTRA_SUBJECT, "SUBJECT"); 
     i.putExtra(Intent.EXTRA_TEXT , "BODY"); 
     try { 
      startActivity(Intent.createChooser(i, "Send email...")); 
     } catch (android.content.ActivityNotFoundException ex) { 
      Toast.makeText(Start.this, "Sorry, there is no email client installed", Toast.LENGTH_SHORT).show(); 
     } 

건배, 펠릭스

관련 문제