In my app I want to click on a particular button and jump to the youtube app and show a youtube user .Eg http://www.youtube.com/user/punjabiradiousa . How is this possible please suggest some technique?
Asked
Active
Viewed 1.3k times
3

Philipp Jahoda
- 50,880
- 24
- 180
- 187

Navdroid
- 1,541
- 3
- 25
- 52
-
possible duplicate of [Calling YouTube app using ACTION\_VIEW intent Failing most of the time](http://stackoverflow.com/questions/2978963/calling-youtube-app-using-action-view-intent-failing-most-of-the-time) You can only view the User's profile if the YouTube app provides that feature. As for viewing Videos. You can pass video url intents. see the link – Aug 21 '13 at 08:07
-
1you may refer to http://stackoverflow.com/a/16514288/1131470 – Chor Wai Chun Aug 21 '13 at 08:08
-
I want to open it in youtube app – Navdroid Aug 21 '13 at 08:25
-
The title asks for video playing, question body asks for showing a user. Please edit the other to make the question clear. – laalto Aug 21 '13 at 12:08
3 Answers
8
Do it like this:
startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("http://www.youtube.com/user/punjabiradiousa")));
Taken from here: Android YouTube app Play Video Intent

Community
- 1
- 1

Philipp Jahoda
- 50,880
- 24
- 180
- 187
1
This code i have used to play youtube video
Matcher matcher = Pattern.compile("http://www.youtube.com/embed/").matcher(mVideoId);
matcher.find()
Intent lVideoIntent = new Intent(
null,
Uri.parse("ytv://" + mVideoId),
MainScreen.mContext,
com.kids.youtube.OpenYouTubePlayerActivity.class);
startActivity(lVideoIntent);

laalto
- 150,114
- 66
- 286
- 303

FarhaSameer786
- 370
- 1
- 4
- 12
0
Its Working
startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("")));

Keshav Gera
- 10,807
- 1
- 75
- 53