0

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?

Medo
  • 671
  • 4
  • 11
  • cfr. http://stackoverflow.com/questions/9730243/android-how-to-filter-specific-apps-for-action-send-intent – Dennis Jaamann Sep 20 '13 at 08:43
  • Thanks for your response, but this is for sharing to other apps. I want just to be able to receive content from a specific app. – Medo Sep 20 '13 at 08:52

1 Answers1

1

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.

Ed_
  • 18,798
  • 8
  • 45
  • 71
  • I tried this, it doesn't seem to work. I can still share from other apps (ex. Twitter) – Medo Sep 20 '13 at 10:37