YouTube intent, error 400
30,096
Solution 1
I found the answer on this Google product forums which helped to solve my problem - which was exactly the problem you're experiencing :)
SOLUTION: Give ONLY the YouTube ID and not the entire YouTube URL to the loadVideo()
function.
Solution 2
On loadvideo don't put:
loadvideo(https://www.youtube.com/watch?v=gQy4I5y1ldg12)
just put
loadvideo(gQy4I5y1ldg12);
Author by
POMATu
Updated on July 09, 2022Comments
-
POMATu almost 2 years
I found that I can start a YouTube video in stock YouTube player this way:
Intent i = new Intent(Intent.ACTION_VIEW, Uri.parse("vnd.youtube:U79wVTdnMpw")); startActivity(i);
But it doesn't work. The YouTube player is started, but I get an error:
There was a problem with the network [400]
I have updated the YouTube app but nothing changes.
I am using Android ICS 4.0.1.