2

I know this has been asked quite a few times, but I have tried the answers and non of them worked. This is my current intent-filter

<intent-filter>
            <action android:name="android.intent.action.SEND" />
            <category android:name="android.intent.category.DEFAULT" />
            <data android:mimeType="*/*" android:scheme="http" />
</intent-filter>

The answers I was looking for were android youtube: share a youtube video TO my app? and How to appear my app in YouTube share via list?

But for some reason they don't work for me. I've tried many alternatives, using android:host, using different schemes, specific mime types. I only need to get the url of the youtube video once I click share to my app. Any ideas?

Community
  • 1
  • 1
Stefan
  • 700
  • 10
  • 22

1 Answers1

4

You have to add:

<intent-filter>
            <action android:name="android.intent.action.SEND" />
            <category android:name="android.intent.category.DEFAULT" />
            <data android:mimeType="text/plain" />
        </intent-filter>

in your manifest file (I just tried ;)).

source:Youtube intent filter & scheme more info:http://developer.android.com/training/basics/intents/filters.html

Community
  • 1
  • 1
king
  • 507
  • 1
  • 4
  • 17
  • Wow, this actually worked! I'm confused as to why originally, when I was using text/* mime it didn't work. Thank you! – Stefan Feb 24 '16 at 01:35
  • This is working, but i need my app to appear only on YouTube. By Adding text/plain my app option is also visible on google Photos App.I don't want my App to be visible for sharing photos. – Ruchir May 30 '17 at 07:08
  • @king please give the solution if you have implemented App sharing option to be visible only on Youtube – Ruchir May 30 '17 at 07:20