You should explicitly send it to youtube. You can do this by specifing the package:
intent.setComponent(new ComponentName("com.google.android.youtube","com.google.android.youtube.PlayerActivity"));
Also note that you should also check if youtube is installed!
Intent intent = new Intent(
Intent.ACTION_VIEW ,
Uri.parse("https://www.youtube.com/channel/UCRmoG8dTnv0B7y9uoocikLw"));
intent.setComponent(new ComponentName("com.google.android.youtube","com.google.android.youtube.PlayerActivity"));
PackageManager manager = context.getPackageManager();
List<ResolveInfo> infos = manager.queryIntentActivities(intent, 0);
if (infos.size() > 0) {
context.startActivity(intent);
}else{
//No Application can handle your intent
}
Answer from RvdK on Stack OverflowVideos
You should explicitly send it to youtube. You can do this by specifing the package:
intent.setComponent(new ComponentName("com.google.android.youtube","com.google.android.youtube.PlayerActivity"));
Also note that you should also check if youtube is installed!
Intent intent = new Intent(
Intent.ACTION_VIEW ,
Uri.parse("https://www.youtube.com/channel/UCRmoG8dTnv0B7y9uoocikLw"));
intent.setComponent(new ComponentName("com.google.android.youtube","com.google.android.youtube.PlayerActivity"));
PackageManager manager = context.getPackageManager();
List<ResolveInfo> infos = manager.queryIntentActivities(intent, 0);
if (infos.size() > 0) {
context.startActivity(intent);
}else{
//No Application can handle your intent
}
I found this to be a simple way to do this (assumes you already checked that YouTube is installed):
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setData(Uri.parse("https://www.youtube.com/**YOURCHANNEL**"));
intent.setPackage("com.google.android.youtube");
startActivity(intent);
Whenever I receive a link for a YouTube-Video (via WhatsApp, Signal, SMS,...) and I try opening it in the YouTube-App by tapping on it, it opens the app, but I just get directed to the homescreen of YouTube, instead of getting forwarded to the video I'm trying to open.
To fix this issue I tried several things:
reinstalling the YouTube-App
clearing cache for Safari and Chrome
rebooting the device
factory resetting the data privacy settings
trying opening the video from different sources
trying different links
verifying, that it is an issue specific to the YouTube-App by trying to reproduce the issue with Spotify or Instagram
updating all apps and the OS
I'm running out of possible things to do to fix this issue and hope someone has had similar issues and found a fix or at least a workaround. Both the official Apple support and Google support could not help me. Does anybody have any other idea?
iPhone 16 Pro Max iOS 26.1 Youtube 20.45.3 Safari up to date, can't find the version
Every time I open a YouTube video link off of web page or even off of Google, it'll go to brave browser and open the mobile version of YouTube instead of opening the YouTube app.
I want to know how I can add a button within the mobile version of YouTube to open it with the app and not the browser. I'm not signed in on the browser and I don't want to sign in on the browser when I got an app that can do the same thing.
Here's a picture of kind of like a mock-up of a button that I'm kind of wanting to put in: https://imgur.com/a/LTvdbrd
But now when you click on that button, it'll open the YouTube app with that video playing in the YouTube app and not on the browser.
Edit: This looks to be fixed for me as of the latest YouTube app update on 11/17. So far so good!
Using an iPhone 16 pro max on the latest iOS. Somehow the YouTube app has broken within the past few weeks. Now when I try to open any link on the phone outside of the app (like in messenger or in safari) it’ll open the app but it won’t go to the video. Instead it just goes to the Home Screen.
I’ve cleared my safari browser files, reinstalled the YouTube app, restarted the phone etc. I’m not sure what else to try but it sucks. Anyone have any suggestions that don’t involve factory resetting my phone?