Email intent no longer working in Android Lollipop -
Email intent no longer working in Android Lollipop -
i have been using below code start intent
in android send email. prior android lollipop (api level 21) worked fine. unfortunately, in android lollipop, throws "unsupported action" error.
intent intent = new intent(intent.action_sendto); intent.settype("message/rfc822"); intent.setdata(uri.parse("mailto:" + email)); startactivity(intent);
it's pretty basic, passes e-mailaddress , lets user pick application use.
how should adapt code create work across api levels? minimum api level 16 (jellybean).
edit i've included mime-type, per comments , answers.
i've got it. caused not having set emailaccount. after setting 1 in @ to the lowest degree 1 email app, works.
it's not problem lollipop.
android android-intent android-5.0-lollipop
Comments
Post a Comment