Should I use vnd.youtube:videoID?

During the game with the emulator, I noticed that when I try to watch the video on YouTube, the browser gives an error, stating that it cannot load the page in vnd.youtube:ngc978y6rCU?some=parameters . I do not have an Android device, but I can assume that starting the VIEW intent with the data URI set to vnd.youtube:VIDEO_ID will launch the YouTube app by default and watch this video.

My app should now show videos on YouTube. Right now, I have YouTube user activity that does just that, but I think:

  • Removing my user activity and just starting VIEW intent with vnd.youtube:VIDEO_ID Uri or
  • Checking for Intent and using it or, if unavailable, using my user activity.

Is that a good idea? Does it work at all (as I said, I don’t have an Android device, I just take it from a friend to check my final application)? Which direction should I go?

+4
source share
2 answers

It is for you. You can use Youtube Intent, but since these details were never released, it could be changed and your code broken.

+2
source

Verify that the VIEW intent will be executed with the data installed at http://www.youtube.com/watch?v=xxx . This is possible for Android applications. This will provide a better experience if the phone does not have the Youtube application (and you do not want to rely on your user player).

0
source

Source: https://habr.com/ru/post/1307467/


All Articles