Android default email app can not be called in my situation, how to resolve? -


i know can use android build in email app when use intent action_send, there no problem me. problem comes after defined action_send in androidmanifest.xml follows:

<activity android:name=".activity.myactivity">   <intent-filter>                 <action android:name="android.intent.action.send" />                 <category android:name="android.intent.category.default" />                 <data android:mimetype="image/png" />         </intent-filter> </activity> 

since see own app added in share option list when user click "share" in gallery, have define above <intent-filter> in androidmanifest.xml.

after defined above configuration in androidmanifest.xml, whenever call "intent emailintent = new intent(intent.action_send);", android app go call "myactivity" instead of calling android build in email app.

all of above understandable, question how keep configuration in androidmanifest.xml above (that's keep app shown in share option list when user click "share" in gallery), meanwhile, can call android default email app???

after defined above configuration in androidmanifest.xml, whenever call "intent emailintent = new intent(intent.action_send);", android app go call "myactivity" instead of calling android build in email app.

that occur if user set application default particular action , mime type combination.

meanwhile, can call android default email app???

you not calling "the default email app". starting activity action_send says want user , os choose activity handle request. if user set 1 activity default this, activity start up, because user asked for.

you can use createchooser() (static method on intent) force selection available candidates, , used action_send.


Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -