Email intent no longer working in Android Lollipop -



Email intent no longer working in Android Lollipop -

i have been using below code start intentin 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

Popular posts from this blog

xslt - DocBook 5 to PDF transform failing with error: "fo:flow" is missing child elements. Required content model: marker* -

mediawiki - How do I insert tables inside infoboxes on Wikia pages? -

Local Service User Logged into Windows -