title: Open Instagram app from another android app and send an Image with a Caption
body: <p>What I basically looking for is to open Instagram app from another app and send an Image with a caption.
  There is some useful documentation to do this in iOS. (<a href="https://instagram.com/developer/mobile-sharing/iphone-hooks/" rel="nofollow">iPhone-hooks</a>)</p>
  
  <p>Do Instagram support to perform custom actions in Android like in iOS as described in <a href="https://instagram.com/developer/mobile-sharing/iphone-hooks/" rel="nofollow">iPhone-hooks</a>?</p>
  
  <p>Below is the current code used in my application to perform this task partially.</p>
  
  <pre><code>private void sendImageToIntagram(Activity activity) {
      Intent intent = activity.getPackageManager().getLaunchIntentForPackage("com.instagram.android");
      if (intent != null) {
          Intent shareIntent = new Intent();
          shareIntent.setAction(Intent.ACTION_SEND);
          shareIntent.setPackage("com.instagram.android");
          String imagePath = ImageUtil.getProcessedImage().getAbsolutePath();
          try {
              shareIntent.putExtra(Intent.EXTRA_STREAM, Uri.parse(MediaStore.Images.Media.insertImage(activity.getContentResolver(), imagePath, "Title", "Description")));
              // shareIntent.putExtra(Intent.EXTRA_TITLE,  "Caption 01");
              // shareIntent.putExtra(Intent.EXTRA_TEXT,   "Caption 02");
              // shareIntent.putExtra(Intent.EXTRA_SUBJECT,"Caption 03");
  
          } catch (FileNotFoundException e) {
              e.printStackTrace();
          }
          shareIntent.setType("image/jpeg");
          activity.startActivity(shareIntent);
      } else {
          // bring user to the market to download the app.
  
          intent = new Intent(Intent.ACTION_VIEW);
          intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
          intent.setData(Uri.parse("market://details?id=" + "com.instagram.android"));
          activity.startActivity(intent);
      }
  }
  </code></pre>
  
  <p>None of the above Title, description, Caption 01, Caption 02, Caption 03 worked.</p>
  
  <p>Then I tried with,</p>
  
  <p><code>shareIntent.setAction(Intent.ACTION_SEND);</code> --> <code>shareIntent.setAction(Intent.ACTION_SEND_MULTIPLE);</code></p>
  
  <p>and,</p>
  
  <pre><code>shareIntent.setType("image/jpeg");
  shareIntent.setType("image/*");
  shareIntent.setType("*/*"); 
  </code></pre>
  
  <p>too, but none of the above worked also.</p>