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, 2022 in Others by polo
• 1,480 points
2,000 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, 2022 by nisha
• 2,210 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, 2022 in Others by nisha
• 2,210 points
1,443 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, 2022 in Others by Rahul
• 9,680 points
807 views
–1 vote
1 answer

"Default Activity Not Found" on Android Studio upgrade

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

answered Feb 11, 2022 in Others by Soham
• 9,710 points
1,168 views
–2 votes
0 answers

Android Webiew does not load indexed Sdcard (file://sdcard)

When attempting to use mobile browsers to ...READ MORE

Nov 8, 2022 in Android by Edureka
• 13,620 points
1 flag 24,767 views
0 votes
0 answers

Open Instagram User Profile

I managed to open the Twitter and Facebook user profile from ...READ MORE

Nov 23, 2022 in Android by Ashwini
• 5,430 points
378 views
0 votes
0 answers

Indic languages on Android browser/GUI (Gujarati) improper rendering

I am utilising Gujarati languages on a ...READ MORE

Dec 8, 2022 in Android by Edureka
• 12,690 points
362 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,360 points
3,682 views
–1 vote
1 answer

Open file in SDCard on Android

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

answered Jun 20, 2022 in Others by nisha
• 2,210 points
40,054 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, 2022 in Others by nisha
• 2,210 points
1,088 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP