title: Captured image doesn't show up in ImageView
body: <p>in my app I need to capture image and show up in imageview and then I will post it to server. But I'm having a problem, the captured image is not showing in imageview. Here is my code:</p>
  
  <pre><code>private void onCaptureImageResult(Intent data) {
          Bitmap thumbnail = (Bitmap) Objects.requireNonNull(data.getExtras()).get("data");
          ByteArrayOutputStream bytes = new ByteArrayOutputStream();
          assert thumbnail != null;
          thumbnail.compress(Bitmap.CompressFormat.PNG, 90, bytes);
          File destination = new File(Environment.getExternalStorageDirectory() + "/storage/emulated/0/Download/"
                  + new Date().getTime(), System.currentTimeMillis() + ".png");
  
          FileOutputStream fo;
          try {
              destination.createNewFile();
              fo = new FileOutputStream(destination);
              fo.write(bytes.toByteArray());
              fo.close();
          } catch (IOException e) {
              e.printStackTrace();
          }
  
          if (photoMekanik) {
              imageView.setImageBitmap(thumbnail);
              photoMekanik = false;
          } else if (photoElektonik) {
              imageView2.setImageBitmap(thumbnail);
              photoElektonik = false;
          }
      }
  </code></pre>
  
  <p>Image is stored, but I want to access directly after capturing the image. What I'm missing here.</p>