title: how to open bitmap in gallery in android
body: <p>Hi I want to open image in gallery, below is my code  </p>
  
  <pre><code>mImageView.setImageBitmap(AppUtil.getBitmapFromFile(obj.getImageUrl(), 200, 200));
  
      mImageView.setOnClickListener(new OnClickListener() {
          @Override
          public void onClick(View view) {
              Intent intent = new Intent();
              intent.setAction(Intent.ACTION_VIEW);
              intent.setDataAndType(Uri.parse(obj.getImageUrl()), "image/*");
              startActivity(intent);
          }
      });
  </code></pre>
  
  <p>but its showing NullPointerException  </p>
  
  <pre><code>Uri.parse(obj.getImageUrl() returns below string
  </code></pre>
  
  <p>/mnt/sdcard/Pictures/app_images/pro20130429_170323_-1793725321.tmp</p>
  
  <p><strong>update:</strong> now i tried<br>
  <code>startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("file://sdcard/Pictures/app_images/pro20130429_170323_-1793725321.tmp")));</code>
  and getting an error that   </p>
  
  <pre><code>05-03 16:40:18.460: E/AndroidRuntime(4764): android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.VIEW dat=file://sdcard/Pictures/app_images/pro20130429_170323_-1793725321.tmp }
  </code></pre>