title: Problem retrieving picture from Camera intent in other than myself device (Oreo)
body: <p>I am trying to get image from camera intent. Its working nice but only in my device (oreo / 8.1.0). I generate unsigned apk and tried to run in other device (pie and lolipop)but its not working. </p>
  
  <p>I search stackoverflow and other sites, but people asked question about "camera intent problem in lolipop". My question is something different (I think).</p>
  
  <p>I tried to check sdk version and apply different code. I.e. as per one answer from stackoverflow I used this code <code>Picasso.get().load(file).into(imageView);</code> instead of <code>Picasso.get().load(photoURI).into(imageView);</code> in LOLIPOP but its not working.</p>
  
  <pre><code>Intent takePictureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
          if (takePictureIntent.resolveActivity(getPackageManager()) != null) {
              File photoFile = null; // Create the File where the photo should go
              try {
                  photoFile = createImageFile();
                  tempPhoto = photoFile;
              } catch (IOException ex) {
                  // Error occurred while creating the File
              }
              // Continue only if the File was successfully created
              if (photoFile != null) {
                  photoURI = FileProvider.getUriForFile(this,
                          "com.package.appname.fileprovider",
                          photoFile);
                  tempPhoto = photoFile;
                  takePictureIntent.putExtra(MediaStore.EXTRA_OUTPUT, photoURI);
                  startActivityForResult(takePictureIntent, REQUEST_TAKE_PHOTO);
              }
          }
  </code></pre>
  
  <p>Code for createImageFile function:</p>
  
  <pre><code>    private File createImageFile() throws IOException {
          // Create an image file name
          String timeStamp = new SimpleDateFormat("yyyyMMdd_HHmmss").format(new Date());
          String imageFileName = "JPEG_" + timeStamp + "_";
          File storageDir = getExternalFilesDir(Environment.DIRECTORY_PICTURES);
          File image = File.createTempFile(
                  imageFileName,  /* prefix */
                  ".jpg",         /* suffix */
                  storageDir      /* directory */
          );
  
          // Save a file: path for use with ACTION_VIEW intents
          mCurrentPhotoPath = image.getAbsolutePath();
          return image;
      }
  </code></pre>
  
  <p>Receiving result here</p>
  
  <pre><code>   protected void onActivityResult(int requestCode, int resultCode, Intent intent) {
          super.onActivityResult(requestCode, resultCode, intent);
          try {
              if (requestCode == REQUEST_TAKE_PHOTO &amp;&amp; resultCode == RESULT_OK) {
                  File file = new File(mCurrentPhotoPath);
  
                  Picasso.get().load(file).into(imageView);
  
  //                Bitmap bitmap = MediaStore.Images.Media
  //                        .getBitmap(this.getContentResolver(), Uri.fromFile(file));
  //                if (bitmap != null) {
  //                    imageView.setImageBitmap(bitmap);
  //                }
              } else if (requestCode == PICK_IMAGE_REQUEST &amp;&amp; resultCode == RESULT_OK) {
                  File file = new File(mCurrentPhotoPath);
                  Bitmap bitmap = MediaStore.Images.Media.getBitmap(this.getContentResolver(), Uri.fromFile(file));
                  if (bitmap != null) {
                      imageView.setImageBitmap(bitmap);
                  }
              }
  
          } catch (Exception error) {
              error.printStackTrace();
          }
      }
  </code></pre>
  
  <p>Can anyone help me to give accurate result in all sdk versions? Please help me. Thanks in advance.</p>