I am creating an app where user clicks on different social media links. The links are from different media including Facebook, Youtube and WhatsApp etc.
What I want is:
When user clicks on a Facebook link, the program checks if there is Facebook app installed in the user's phone and open the link in it. Similarly for other media.
I have tried a little with this code:
Intent intent=new Intent(Intent.ACTION_VIEW, Uri.parse(uri));
context.startActivity(intent);
But it opens all the link in browser. I am new to android, kindly help! Thanks in advance...