java - Email Intent issue. Cannot select an email option -
updated:
managed sort loading of gmail.
now cannot set 'to', 'subject' , 'message' fields of gmail when intent loaded.
screenshot show email layout:
screenshot show gmail intent loaded. without fields beingness set passed details.
code:
@override public void onclick(view sendemailclick) { intent sendemailintent = new intent(intent.action_send); sendemailintent.settype("plain/text"); sendemailintent.putextra(intent.extra_email, emailadd); sendemailintent.putextra(intent.extra_subject, emailsub); sendemailintent.putextra(intent.extra_text, emailmess); startactivity(intent.createchooser(sendemailintent, "send email")); //startactivity(intent.createchooser(sendemailintent, "send email...")); }
if default email client not have account, should not register intent.action_send. create sure have business relationship added app , seek send email again. noted, using "text/plain" type.
from can find on short notice:
<activity android:name=".activity.messagecompose" android:label="@string/compose_title" android:enabled="false" android:theme="@android:style/theme.holo.light" > the compose activity not enabled default , should enabled 1 time add together account.
java android android-intent
No comments:
Post a Comment