Biswatma
Biswatma

Reputation: 105

How to open instagram launcher activity from another app

 Intent hashtagIntent = new Intent(Intent.ACTION_VIEW,
                    Uri.parse("com.instagram.android"));
            startActivity(hashtagIntent);

I'm trying to launch the instagram app from my app. I have tried the code above, but it failed to open the Instagram app.

Upvotes: 0

Views: 3811

Answers (1)

Vishal Chhodwani
Vishal Chhodwani

Reputation: 2577

Try This

It will help you definitely

Intent launchIntent = getPackageManager().getLaunchIntentForPackage("com.instagram.android");
if (launchIntent != null)
{
    try
    {
        startActivity(launchIntent);
    }
    catch (ActivityNotFoundException ex) // in case Instagram not installed in your device
    {
        ex.printStackTrace();
    }
}

Upvotes: 2

Related Questions