Artemix
Artemix

Reputation: 8655

Adding my app as a sharing option in the Youtube app

Is it possible to add to the list of sharing apps my own app?. The idea is that users that have my app installed have the option to share YouTube videos to my app, so when they click the option my app opens and I receive something from it.

Upvotes: 1

Views: 2395

Answers (1)

SoroushA
SoroushA

Reputation: 2121

For Android: Filter incoming intents to your activity to catch the send intent:

<activity ...>
 <intent-filter>
  <action android:name="android.intent.action.SEND" />
  <category android:name="android.intent.category.DEFAULT" />              
  <data android:host="www.youtube.com" android:mimeType="text/*" />
 </intent-filter>
</activity>

And then your app will show up in the chooser when a user shares something from youtube.

EDIT: For iOS it is not as easy (not possible with lower iOS versions). Take a look at this question for more information about why.

Upvotes: 2

Related Questions