简体   繁体   中英

how to get an image share from HTC sense?

I have a ICS and up app that receives the share intent from the gallery. My manifest intent is the standard intent to receive images:

  <intent-filter> 
      <action android:name="android.intent.action.SEND"/> 
      <data android:mimeType="image/*"/>
  </intent-filter>

It works fine on every device I tested (Asus transformers, nexus 7 galaxy nexus, Samsung s2, Samsung s3) ... but I keep receiving 1 star ratings from HTC sense users saying that doesn't appear on their share menu.

Any ideas on how to fix this nonsense??

Try adding:

<category android:name="android.intent.category.DEFAULT" />

to your <intent-filter> . All activity <intent-filter> elements should have a <category> , as by default all Intent s used with startActivity() will have some category, DEFAULT by default.

HTC is not using queryIntentActivities() alone to populate its share menu, insofar as Picasa does not appear to support any traditional Intent for sharing stuff. However, many of the other apps that do appear in HTC's menu have the <intent-filter> like yours with the <category> element, so with luck, that will work.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM