title: Unable to open File For sharing while sharing image file using intent in Android?
body: <p>I have used this code to share image from drawable folder and its opening "Share intent" with list of available sharing possibilities i.e Bluetooth , Gmail ,FB etc.But on Sending file using Bluetooth gives me error "<strong>Unable to Open file for Sharing</strong>"  when trying to share image from Assets folder while getting error "<strong>File not sent</strong>"  when trying to share file from "<strong>drawable folder</strong>".Can someone please hele me how to share image file using Android.........here is the <strong>Manifest File</strong>:</p>
  
  <pre><code> &lt;manifest xmlns:android="http://schemas.android.com/apk/res/android"
      package="com.example.shareima"
      android:versionCode="1"
      android:versionName="1.0" &gt;
  &lt;uses-sdk
          android:minSdkVersion="8"
          android:targetSdkVersion="17" /&gt;
   &lt;uses-permission android:name="android.permission.INTERNET"/&gt;
   &lt;uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/&gt;
   &lt;uses-permission android:name="android.permission.BLUETOOTH"/&gt;
      &lt;application
          android:allowBackup="true"
          android:icon="@drawable/ic_launcher"
          android:label="@string/app_name"
          android:theme="@style/AppTheme" &gt;
          &lt;activity
              android:name="com.example.shareima.MainActivity"
              android:label="@string/app_name" &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>
  
  <p><strong>MainActivity.java</strong></p>
  
  <pre><code> public class MainActivity extends Activity {
  
          @Override
          protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
              Intent share = new Intent(Intent.ACTION_SEND);
              share.setType("image/png");
             Uri imageUri = Uri.parse("android.resource://com.example.shareima/drawable/ic_launcher");
              Log.i("imageUri",""+imageUri);
              share.putExtra(Intent.EXTRA_STREAM,imageUri);
              startActivity(Intent.createChooser(share,"Share Image"));
          }
      }
  </code></pre>