I have looked at the intent-filter documentation and I can't figure out this specific intent-filter.
I'm looking to use ACTION_SEND because I only want the app to show up in "Share" menus in other apps. I only want to show up in the share menu if the text of the intent is a url. For example, what is shared from the Android Browser's share menu. I don't want the app to appear in the share menu if it's just text and not a url.
What I have so far is:
<intent-filter android:label="Label">
<action android:name="android.intent.action.SEND" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="text/*" />
</intent-filter>
However, this will receive any text, not just urls.
Thanks
You can create IntentFilter objects programmatically, and they can filter on URI schema among other things... much more control.
I thought subclassing IntentFilter would give you event more, but they made all the variations on "match" final
so you can't override them in a subclass. Bah!
Eurika!
You can specify a data "scheme" instead of a mimetype. Just ask for "http" and "https" (in separate intent filters?).
<intent-filter>
...
<data android:scheme="http"/>
</intent-filter>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With