title: Android: No Activity found to handle Intent { act=android.intent.action.OPEN_DOCUMENT cat=[android.intent.category.OPENABLE] typ=image/* }
body: <p>I have one <code>ImageView</code> in my layout file. I just want to load an image in the <code>ImageView</code> when I open my app.</p>
  
  <p>But what happens is that when I open my app it occurs an error message</p>
  
  <pre><code>Caused by: android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.OPEN_DOCUMENT cat=[android.intent.category.OPENABLE] typ=image/* }
  </code></pre>
  
  <p>Here is the code</p>
  
  <pre><code>ImageView mImageView;
      private static final int REQUEST_OPEN_RESULT_CODE=0;
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_image_viewer_main);
  
          mImageView=(ImageView)findViewById(R.id.imageView);
  
          Intent intent= new Intent(Intent.ACTION_OPEN_DOCUMENT);
          intent.addCategory(Intent.CATEGORY_OPENABLE);
          intent.setType("image/*");
          startActivityForResult(intent, REQUEST_OPEN_RESULT_CODE );
      }
  
      @Override
      protected void onActivityResult(int requestCode, int resultCode, Intent resultData) {
          if(requestCode==REQUEST_OPEN_RESULT_CODE &amp;&amp; resultCode==RESULT_OK){
              Uri uri=null;
              if(resultData!=null){
                  uri=resultData.getData();
                  try {
                      Bitmap bitmap=getBitmapFromUri(uri);
                      mImageView.setImageBitmap(bitmap);
                  } catch (IOException e) {
                      e.printStackTrace();
                  }
              }
  
          }
      }
  
      private Bitmap getBitmapFromUri(Uri uri) throws IOException{
          ParcelFileDescriptor parcelFileDescriptor=getContentResolver().openFileDescriptor(uri, "r");
          FileDescriptor fileDescriptor=parcelFileDescriptor.getFileDescriptor();
          Bitmap bitmap= BitmapFactory.decodeFileDescriptor(fileDescriptor);
          parcelFileDescriptor.close();
          return bitmap;
  
      }
  </code></pre>