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
android eclipse instagram


source to share


No one has answered this question yet

Check out similar questions:

1116
Android SDK installation not finding JDK
877
Why doesn't RecyclerView have onItemClickListener ()?
3
Android Implicit and Explicit Intentions
2
Building an Android app that just launches a url in the browser
1
Android instagram page in webview loading endlessly
0
Android: upload file without .pfd, .png ... at end of link
0
Intent filter with MIME type for a specific provider
0
Is there a way to open and play slides in android app
0
Error message & # 8594; shouldOverrideUrlLoading Webview Android
0
Android Market Accept app use WebViewClient?



All Articles
Loading...
X
Show
Funny
Dev
Pics