Open Instagram user profile on android

0 votes
i am making a social media networking app and users can connect their social media to it.. I'd like to open Instagram account directly in their official Android app  but I can't do it.

However, there is a page on their developer site about the exact same feature on iOS but this doesn't seem to work on Android.

Everything I found on the web only suggests various ways to open links in a browser. Any input?
May 30 in Others by polo
• 1,500 points
10 views

1 answer to this question.

0 votes

To open instagram app-

String scheme = "http://instagram.com/_u/USER";
String path = "https://instagram.com/USER";
String nomPackageInfo ="com.instagram.android";
    try {
        activate.getPackageManager().getPackageInfo(nomPackageInfo, 0);
        intentAiguilleur = new Intent(Intent.ACTION_VIEW, Uri.parse(scheme));
        } catch (Exception e) {
            intentAiguilleur = new Intent(Intent.ACTION_VIEW, Uri.parse(path));
        }
        activate.startActivity(intentAiguilleur); 

// Use this link to open directly a picture
  String scheme = "http://instagram.com/_p/PICTURE";
answered May 31 by nisha
• 2,160 points

Related Questions In Others

0 votes
0 answers

Is it possible to open developer tools console in Chrome on Android phone?

Is it possible to open JS console ...READ MORE

Jun 14 in Others by nisha
• 2,160 points
7 views
0 votes
1 answer

How to open the Google Play Store directly from my Android application?

By using developer.andriod.com, one can solve this ...READ MORE

answered Feb 8 in Others by Rahul
• 8,980 points
15 views
0 votes
1 answer

"Default Activity Not Found" on Android Studio upgrade

If you see that ERROR occurrence after ...READ MORE

answered Feb 11 in Others by Soham
• 8,730 points
161 views
0 votes
1 answer

Running docker on Android

According to the documentation, the Android kernel is ...READ MORE

answered Aug 1, 2018 in Docker by Kalgi
• 52,350 points
2,956 views
0 votes
1 answer

Selenium WebDriver operates very slow

Allowing WebDriver to attach to a running browser - ...READ MORE

answered Aug 24, 2018 in Selenium by Meci Matt
• 9,460 points
3,489 views
0 votes
1 answer

Task Canceled Exception while invoking AWS Lambda

I'm guessing either the TaskCanceledException instance is ...READ MORE

answered Sep 19, 2018 in AWS by Priyaj
• 58,080 points
1,510 views
0 votes
1 answer

Open file in SDCard on Android

To open a file that is on ...READ MORE

answered Jun 20 in Others by nisha
• 2,160 points
8 views
0 votes
1 answer

How use File("/sdcard/myfile") without READ_EXTERNAL_STORAGE on android 11?

You first need to use File.exists() and ...READ MORE

answered May 31 in Others by nisha
• 2,160 points
20 views
webinar REGISTER FOR FREE WEBINAR X
Send OTP
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP