title: Sharing Failed in Intent
body: <p>I am trying to send image using intent as below : </p>
  
  <pre><code>Intent shareIntent = new Intent();
  shareIntent.setAction(Intent.ACTION_SEND);
  shareIntent.putExtra(Intent.EXTRA_STREAM, Uri.fromFile(mArray[position]));
  shareIntent.setType("image/png");
  shareIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
  startActivity(shareIntent);
  </code></pre>
  
  <p>EDIT: FILE IMAGE ARRAY</p>
  
  <pre><code>private void createDrawbleArray(File fileDir) {
  
      mArray = new File[Constants.TOTAL_GRID_ICONS];
      TypedArray tArray = getResources().obtainTypedArray(R.array._images);
  
      for (int i = 0; i &lt; Constants.TOTAL_GRID_ICONS; i++) {
          mArray[i] = getFileForResource(this, tArray.getResourceId(i, -1), fileDir, "a" + i + ".png");
      }
      tArray.recycle();
  
  }
  </code></pre>
  
  <p>EDIT : PERMISSIONS</p>
  
  <pre><code>&lt;uses-permission android:name="android.permission.INTERNET" /&gt;
  &lt;uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /&gt;
  &lt;uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /&gt;
  &lt;uses-permission android:name="android.permission.READ_CONTACTS" /&gt;
  </code></pre>
  
  <p>But, unfortunately its giving me Sharing failed toast.
  What might be the issue ?</p>
  
  <p>Thanks.</p>