0

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??

Budius
  • 39,391
  • 16
  • 102
  • 144
  • Can you name here the specific HTC models that are generating these complaints? – CommonsWare Aug 19 '12 at 12:52
  • Two users said HTC One X and one said "HTC lte" which I know it's not a device but that's what the user said on play store. Any ideas? – Budius Aug 19 '12 at 13:18
  • I have an idea, but I'd like to run a test. Can you post a link to the app in question, along with brief steps for reproducing the problem? I have an HTC One S that may exhibit the same behavior. – CommonsWare Aug 19 '12 at 13:41
  • The app must be available on the gallery share action, so, to reproduce its just go to the gallery and see if it's not there. The correct behavior can be seen on the video. https://play.google.com/store/apps/details?id=com.budius.WiFiShoot – Budius Aug 19 '12 at 14:47

1 Answers1

2

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 Intents 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.

CommonsWare
  • 986,068
  • 189
  • 2,389
  • 2,491
  • Unfortunately I can't test it now because I'm having internet problems (been checking stack overflow on mobile) but I like the approach, it does make sense and as soon as possible I'll include it in the built, update it and be back here. – Budius Aug 19 '12 at 16:46
  • I've managed to upload the new apk from my phone. Could you test if the new file is working on HTC phones? It's the version 0.34! Thanks. – Budius Aug 19 '12 at 22:30
  • @Budius: OK, it hasn't rippled out yet to the Play Store Web site or the HTC One S's connection to the Play Store. If you have not heard back from me in 24 hours, comment here to remind me to check this, as I may have forgotten. Or, if you see your version go live on the Play Store Web site, comment here to let me know it is ready (I can always uninstall and reinstall if needed). – CommonsWare Aug 19 '12 at 22:49
  • I just installed 0.34 on a retail AT&T One X here, started the app, left the app, opened the gallery, went into a category, hit share, and WiFi Shoot did show up in the menu. So it appears to be fixed. – Lance Nanek Aug 20 '12 at 02:28
  • I just checked a user comment as well (in italian) on HTC One S. Seems to be working now, thanks so much @CommonsWare – Budius Aug 20 '12 at 11:48
  • @Budius: Yeah, I just got a chance to check it now on the One S, and it is working. To be honest, I am a bit surprised that your `` worked as well as it did elsewhere -- I would have expected this issue to affect pretty much all phones, not just HTC's. But, at least it's working now. – CommonsWare Aug 20 '12 at 11:50
  • Strangly my main base of developing are nexus devives, so one would assume that's the way. Thanks for all the help. – Budius Aug 22 '12 at 08:14