Link is not included in Instagram app
I needed to click on the instagram in the app I am creating, this is how it is, when I click on it, it goes to the browser, I wanted to go to the Instagram natgeotravel app, if there was no Instagram app in my mobile device it goes to the browser
Here is the code
if (uri.contains("https://www.instagram.com/" )) {
String natgeotravel = "natgeotravel";
String uri1 = "instagram://Page/" + natgeotravel;
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(uri1));
startActivity(intent);
} else {
String natgeotravel= "natgeotravel";
String uri1 = "https://www.instagram.com/" + natgeotravel;
Intent i = new Intent(Intent.ACTION_VIEW, Uri.parse(uri1));
startActivity(i);
}
}
});
I even tried !
in the beginning uri
but still didn't work, it comes with msg message You must log out in order to reset your password
andSorry, we weren't able to load that link
Reference:)
+3
source to share
No one has answered this question yet
Check out similar questions: