androidyoutubeyoutube-apiyoutube-channels

How to launch Youtube application to open a channel?


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.


Solution

  • 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!