Sharing a bitmap image
<p>In my app I want to get the encrypted image from a folder and display it in a gallery, when I click on the image I want to send the decrypted image, I am using the code for sharing the image is.</p>

<pre><code> boolean share = false;

     share = true;

     if (share) 
     {
         try 
         {
             List&lt;String&gt; FileList = tFileList;
             Intent sendIntent  = new Intent(Intent.ACTION_SEND);
             sendIntent.setType("*/*");
             sendIntent.setClassName("com.android.mms", "com.android.mms.ui.ComposeMessageActivity");
             System.out.println("Global Position"+globalPosition);
             final File file1 = new File(FileList.get(globalPosition).toString());

             Uri uri = Uri.fromFile(file1);
             Log.e("Path", "" + uri);
             sendIntent.putExtra(Intent.EXTRA_STREAM, uri);
             startActivity(Intent.createChooser(sendIntent, ""));
             share = true;

         } catch (Exception e) 
         {
              share = false;
         }

     }
     else
     {
         share = false;
         Log.e("Path", "File Error");
     }
    return share;
</code></pre>

<ol>
<li>The problem with this code is it is sending the actual encrypted image from the location in sd card. </li>
<li>I want to send the data which is stored in a bitmap named globalBitmap. </li>
</ol>
