Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>If you look at the intent filter the official youtube app uses you will see this:</p> <pre><code>&lt;activity android:name="Player"&gt; &lt;intent-filter&gt; &lt;action android:name="android.intent.action.VIEW" /&gt; &lt;category android:name="android.intent.category.DEFAULT" /&gt; &lt;category android:name="android.intent.category.BROWSABLE" /&gt; &lt;data android:scheme="http" android:host="youtube.com" android:pathPrefix="/watch" /&gt; &lt;data android:scheme="https" android:host="youtube.com" android:pathPrefix="/watch" /&gt; &lt;/intent-filter&gt; &lt;intent-filter&gt; &lt;action android:name="android.intent.action.VIEW" /&gt; &lt;category android:name="android.intent.category.DEFAULT" /&gt; &lt;category android:name="android.intent.category.BROWSABLE" /&gt; &lt;data android:scheme="http" android:host="*.youtube.com" android:pathPrefix="/watch" /&gt; &lt;data android:scheme="https" android:host="*.youtube.com" android:pathPrefix="/watch" /&gt; &lt;/intent-filter&gt; &lt;intent-filter&gt; &lt;action android:name="android.intent.action.VIEW" /&gt; &lt;category android:name="android.intent.category.DEFAULT" /&gt; &lt;category android:name="android.intent.category.BROWSABLE" /&gt; &lt;data android:scheme="http" android:host="www.youtube.com" android:pathPrefix="/v/" /&gt; &lt;data android:scheme="https" android:host="www.youtube.com" android:pathPrefix="/v/" /&gt; &lt;data android:scheme="http" android:host="www.youtube.com" android:pathPrefix="/e/" /&gt; &lt;data android:scheme="https" android:host="www.youtube.com" android:pathPrefix="/e/" /&gt; &lt;data android:scheme="http" android:host="www.youtube.com" android:pathPrefix="/embed/" /&gt; &lt;data android:scheme="https" android:host="www.youtube.com" android:pathPrefix="/embed/" /&gt; &lt;/intent-filter&gt; &lt;intent-filter&gt; &lt;action android:name="android.intent.action.VIEW" /&gt; &lt;category android:name="android.intent.category.DEFAULT" /&gt; &lt;category android:name="android.intent.category.BROWSABLE" /&gt; &lt;data android:scheme="vnd.youtube" /&gt; &lt;/intent-filter&gt; &lt;/activity&gt; </code></pre> <p>To get the video ID you can parse the string you get from:</p> <pre><code>Uri uri = this.getIntent().getData(); </code></pre> <p>As you can see there is no filter for youtu.be but that can be added with:</p> <pre><code>&lt;intent-filter&gt; &lt;action android:name="android.intent.action.VIEW" /&gt; &lt;category android:name="android.intent.category.DEFAULT" /&gt; &lt;category android:name="android.intent.category.BROWSABLE" /&gt; &lt;data android:scheme="http" android:host="youtu.be" /&gt; &lt;data android:scheme="https" android:host="youtu.be" /&gt; &lt;/intent-filter&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload