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
![](../../users/profiles/1590502.webp)
Philipp Jahoda
- 47,594
- 21
- 164
- 175
![](../../users/profiles/994926.webp)
Navdroid
- 1,475
- 3
- 24
- 48
-
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
![](../../users/profiles/-1.webp)
Community
- 1
- 1
![](../../users/profiles/1590502.webp)
Philipp Jahoda
- 47,594
- 21
- 164
- 175
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);
![](../../users/profiles/101361.webp)
laalto
- 137,703
- 64
- 254
- 280
![](../../users/profiles/2632787.webp)
FarhaSameer786
- 370
- 4
- 12
0
Its Working
startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("")));
![](../../users/profiles/5316872.webp)
Keshav Gera
- 8,200
- 1
- 56
- 43