Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

YouTube intent, error 400

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.

like image 576
POMATu Avatar asked Dec 05 '12 19:12

POMATu


People also ask

How do I fix Error 400 on YouTube?

Step A: Go to Settings and select App Management b: Tap the App List and pick out “YouTube”. Step B: Then click on 'Storage' and press 'Clear cache'. Step C: This may reset your default YouTube app and probably restore server error [400].

What Does there was a problem with server 400 mean?

The HyperText Transfer Protocol (HTTP) 400 Bad Request response status code indicates that the server cannot or will not process the request due to something that is perceived to be a client error (for example, malformed request syntax, invalid request message framing, or deceptive request routing).

Why does my TV say Google 400 Thats an error?

If you see error 400 while watching online videos on your smart TV, first try reloading the video, then clear the app cache in your TV's settings. If you're still having trouble, log out and log back into the streaming app, then restart your TV.


1 Answers

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.

like image 102
marienke Avatar answered Oct 19 '22 03:10

marienke