title: Sharing through email only in android using Intent
body: <p>I want to send the photo by only email using Intent. I am using below code but its not opening only gmail but showing many share options.</p>
  
  <p>Please help me to share the only gmail.</p>
  
  <pre><code>Intent share = new Intent(android.content.Intent.ACTION_SEND);
  share.setType("image/jpeg"); // put here your mime type
  List&lt;ResolveInfo&gt; resInfo = getPackageManager().queryIntentActivities(share, 0);
  if(!resInfo.isEmpty()) {
      Intent targetedShare = new Intent(android.content.Intent.ACTION_SEND_MULTIPLE);
      ArrayList&lt;Uri&gt; uris = new ArrayList&lt;Uri&gt;();
      for (ResolveInfo info : resInfo) {
          if(info.activityInfo.packageName.toLowerCase().contains("gmail") || info.activityInfo.name.toLowerCase().contains("gmail")) {
              targetedShare.setType("image/jpeg"); // put here your mime type
  
              targetedShare.putExtra(Intent.EXTRA_SUBJECT, "Amplimesh Photo");
              targetedShare.putExtra(Intent.EXTRA_TEXT,"Attached the Quote");
  
              //Fetching the Installed App and open the Gmail App.
              for(int index = 0; index &lt; productList.size(); index++) {
                  ByteArrayInputStream byteInputStream = new ByteArrayInputStream(productList.get(index).getOverlayBitmap());
                  Bitmap overLayBitmap = BitmapFactory.decodeStream(byteInputStream);
  
                  String fileName = SystemClock.currentThreadTimeMillis() + ".png";
  
                  //Save the bitmap to cache.
                  boolean isSaved = Helper.saveImageToExternalStorage(overLayBitmap, getApplicationContext(), fileName);
                  if(isSaved)
                      uris.add(Uri.fromFile(new File(Environment.getExternalStorageDirectory().getAbsolutePath() + "/amplimesh/images/" + fileName)));
              }
          }
      }
  
      targetedShare.putParcelableArrayListExtra(Intent.EXTRA_STREAM, uris);
  startActivityForResult(Intent.createChooser(targetedShare, "Sending multiple attachment"), 12345);
  }
  </code></pre>