How to launch Youtube application to open a channel?

androniennn picture androniennn · Feb 25, 2012 · Viewed 14.4k times · Source

I want to access from my application to youtube to open a channel. I've searched for a solution but i just found how to open/stream a video :

Intent i = new Intent(Intent.ACTION_VIEW, Uri.parse("vnd.youtube:VIDEO_ID"));
startActivity(i);

But what about opening directly a channel?

Thank you very much.

Answer

ByteMe picture ByteMe · Feb 25, 2012
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setData(Uri.parse(urlStr));
startActivity(intent);

if you use the url of a youtube channel such as: http://www.youtube.com/user/JustinBieberVEVO

this should give you the option to open youtube to the given channel.

hope this helps!