title: Image uploaded from gallery not visible on Motorola device
body: <p>I need to upload an image from the Gallery of my mobile and show it. I use this code.</p>
  
  <pre><code>protected void onActivityResult(int requestCode, int resultCode, Intent data) {
      super.onActivityResult(requestCode, resultCode, data);
      if (requestCode == LOAD_IMAGE_RESULT &amp;&amp; resultCode == RESULT_OK &amp;&amp; data != null) {
          Uri pickedImage = data.getData();
          String[] filePath = { MediaStore.Images.Media.DATA };
          Cursor cursor = getContentResolver().query(pickedImage, filePath, null, null, null);
          cursor.moveToFirst();
          String imagePath = cursor.getString(cursor.getColumnIndex(filePath[0]));
          Bitmap bitmap = BitmapFactory.decodeFile(imagePath);
          postImage.setImageBitmap(bitmap);
          cursor.close();
      }
  }
  </code></pre>
  
  <p>When I use it in a Samsung device it works, whether when I try it on a Motorola, it doesn't work. The problem is that the bitmap seems to be empty.
  I tried to upload images from the SD card and from the main storage, but the bitmap is always empty.
  Somebody knows how to solve this issue?
  Thanks</p>