i have youtube button which will open a particular *channel* for that i want it to open in youtube *application* in order to access a channel from my application.
Intent intent = new Intent(Intent.ACTION_VIEW , Uri.parse("https://www.youtube.com/channel/UCRmoG8dTnv0B7y9uoocikLw"));
context.startActivity(intent);
But it is opening in browser.
I found this to be a simple way to do this (assumes you already checked that YouTube is installed):
urlStr is the url of your desired channel
You should explicitly send it to youtube. You can do this by specifing the package:
Also note that you should also check if youtube is installed!