Reputation: 671
Is it possible to receive content just from the YouTube app?
When a user clicks the share button inside the YouTube App (and no other app/browser), my app should be listed in the share dialog.
<intent-filter>
<action android:name="android.intent.action.SEND"/>
<category android:name="android.intent.category.DEFAULT"/>
<data
android:host="???"
android:scheme="???"
android:mimeType="text/*"/>
</intent-filter>
Can I filter by package name?
Upvotes: 0
Views: 253
Reputation: 19098
Have you tried:
<data android:host="com.google.android.youtube" />
in your intent filter?
If that doesn't work, then your best course of action would be to register it as a normal "share" broadcast receiver and log various elements of the broadcast to the console, then compare shares from YouTube to all other apps.
Upvotes: 1