in my app i have several different social media links, from different plattforms and im trying to build an intent that launches the appropriate App if there is one. And if not hands off the link to the browser.
For example there is faceboook:
facebook://facebook.com/username
This works great, if i have the facebook app it is launched and the given address is loaded.
now the same user also has a googleplus,twitter, Xing, Youtube.
If i try this:
String socialNetwork = "http://m.youtube.com/user/username"
startActivity(Intent.createChooser(new Intent(Intent.ACTION_VIEW, Uri.parse(socialNetwork)), "Open with:"));
The address is opened in a Browers window. But i want it to open with the installed YouTube App. Or twiiter or googleplus or xing based on the link i try to open.