title: Android Instagram sharing exception
body: <p>I am making an application for one company and I need to make sharing on Instagram.</p>
  
  <p>The code I am using is:</p>
  
  <pre><code>public void SharingToSocialMedia(String application) {
  
      Intent intent = new Intent();
      intent.setAction(Intent.ACTION_SEND);
      intent.setType("text/plain");
      intent.putExtra(Intent.EXTRA_TEXT, "http://www.google.sk/");
  
      boolean installed = checkAppInstall(application);
      if (installed) {
          intent.setPackage(application);
          startActivity(intent);
      } else {
          Toast.makeText(getApplicationContext(),
                  "Nie je nainštalovaná aplikácia", Toast.LENGTH_LONG).show();
      }
  
  }
  private boolean checkAppInstall(String uri) {
      PackageManager pm = getPackageManager();
      try {
          pm.getPackageInfo(uri, PackageManager.GET_ACTIVITIES);
          return true;
      } catch (PackageManager.NameNotFoundException e) {
      }
  
      return false;
  }
  </code></pre>
  
  <p>where</p>
  
  <pre><code>application = "com.instagram.android"
  </code></pre>
  
  <p>The problem is that I am getting this error</p>
  
  <pre><code>05-07 16:48:50.728 6192-6192/eu.maweb.lodkanadeje.lodkanadeje E/AndroidRuntime: FATAL EXCEPTION: main
  Process: eu.maweb.lodkanadeje.lodkanadeje, PID: 6192
  android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.SEND typ=text/plain flg=0x1 pkg=com.instagram.android clip={text/plain T:http://www.google.sk/} (has extras) }
      at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1854)
      at android.app.Instrumentation.execStartActivity(Instrumentation.java:1544)
      at android.app.Activity.startActivityForResult(Activity.java:4391)
      at android.support.v4.app.BaseFragmentActivityJB.startActivityForResult(BaseFragmentActivityJB.java:50)
      at android.support.v4.app.FragmentActivity.startActivityForResult(FragmentActivity.java:79)
      at android.app.Activity.startActivityForResult(Activity.java:4335)
      at android.support.v4.app.FragmentActivity.startActivityForResult(FragmentActivity.java:859)
      at android.app.Activity.startActivity(Activity.java:4697)
      at android.app.Activity.startActivity(Activity.java:4665)
      at eu.maweb.lodkanadeje.lodkanadeje.MainActivity.SharingToSocialMedia(MainActivity.java:134)
      at eu.maweb.lodkanadeje.lodkanadeje.MainActivity.onNavigationItemSelected(MainActivity.java:117)
      at android.support.design.widget.NavigationView$1.onMenuItemSelected(NavigationView.java:156)
      at android.support.v7.view.menu.MenuBuilder.dispatchMenuItemSelected(MenuBuilder.java:822)
      at android.support.v7.view.menu.SubMenuBuilder.dispatchMenuItemSelected(SubMenuBuilder.java:88)
      at android.support.v7.view.menu.MenuItemImpl.invoke(MenuItemImpl.java:156)
      at android.support.v7.view.menu.MenuBuilder.performItemAction(MenuBuilder.java:969)
      at android.support.design.internal.NavigationMenuPresenter$1.onClick(NavigationMenuPresenter.java:342)
      at android.view.View.performClick(View.java:5646)
      at android.view.View$PerformClick.run(View.java:22450)
      at android.os.Handler.handleCallback(Handler.java:755)
      at android.os.Handler.dispatchMessage(Handler.java:95)
      at android.os.Looper.loop(Looper.java:156)
      at android.app.ActivityThread.main(ActivityThread.java:6524)
      at java.lang.reflect.Method.invoke(Native Method)
      at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:941)
      at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:831)
  </code></pre>
  
  <p>I am using the same code for Facebook and for Twitter and it works perfectly... So can someone please help me with this exception?</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>here is Manifest file</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;manifest xmlns:android="http://schemas.android.com/apk/res/android"
  
      package="eu.maweb.lodkanadeje.lodkanadeje"&gt;
  
      &lt;uses-permission android:name="android.permission.WAKE_LOCK" /&gt;
      &lt;uses-permission android:name="android.permission.INTERNET" /&gt;
  
      &lt;application
          android:allowBackup="true"
          android:icon="@mipmap/lodka"
          android:label="Loďka Nádeje"
          android:roundIcon="@mipmap/lodka"
          android:supportsRtl="true"
          android:theme="@style/AppTheme"&gt;
          &lt;provider
              android:authorities="com.facebook.app.FacebookContentProvider2295668910658614"
              android:name="com.facebook.FacebookContentProvider"
              android:exported="true"/&gt;
          &lt;activity
              android:configChanges="orientation|screenSize"
              android:name=".MainActivity"
              android:label="Loďka nádeje"
              android:theme="@style/AppTheme.NoActionBar"&gt;
              &lt;intent-filter&gt;
                  &lt;action android:name="android.intent.action.MAIN" /&gt;
  
                  &lt;category android:name="android.intent.category.LAUNCHER" /&gt;
              &lt;/intent-filter&gt;
          &lt;/activity&gt;
      &lt;/application&gt;
  
  &lt;/manifest&gt;
  </code></pre>