title: If i have uri that start with "content://com.google.android.apps" how do i get bitmap from that
body: <p>I choose from the android device file and i got uri that start with &quot;content://com.google.android.app&quot; and for some reason i can't make load it into bitmap,</p>
  <p>the code</p>
  <pre><code>public void insertImage(View view) {
          Intent chooseFile;
          Intent intent;
          chooseFile = new Intent(Intent.ACTION_GET_CONTENT);
          chooseFile.setType(&quot;*/*&quot;);
          chooseFile.addCategory(Intent.CATEGORY_OPENABLE);
          intent = Intent.createChooser(chooseFile, &quot;Choose a file&quot;);
          intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
          startActivityForResult(intent, PICKFILE_RESULT_CODE);
  }
  
  @Override
      protected void onActivityResult(int requestCode, int resultCode, Intent data) {
        super.onActivityResult(requestCode, resultCode, data);
          switch (requestCode) {
              case PICKFILE_RESULT_CODE:
                  if (resultCode == RESULT_OK) {
                      Uri uri = data.getData();
                      String str = data.getData().toString();
                      String mimeType = getContentResolver().getType(uri);
                      try {
                          // User content resolver to get uri input stream.
                          InputStream inputStream = 
                              getContentResolver().openInputStream(uri);
                          // Get the bitmap.
                          Bitmap imgBitmap = BitmapFactory.decodeStream(inputStream);
                          // Show image bitmap in imageview object.
                          imageView.setImageBitmap(imgBitmap);
                       }catch(FileNotFoundException ex)
                      {
                          Log.e(TAG, ex.getMessage(), ex);
                      }
                  }
                  break;
               }
      }
  </code></pre>
  <p>any ideas?</p>