title: Bitmap image choose from gallery not showing in imageview for android version 5.0.2
body: <p>I found that my function of the app is not working for certain android phone. </p>
  
  <p>I think maybe is the problem of android version? My app is working fine on an other Android phone, so how can I solve this issue?</p>
  
  <pre><code>public class StartActivity extends AppCompatActivity {
  
      private Button btnupload,btnchoose;
      private ImageView imgprofile;
  
      Uri filepath;
  
      private static final int PICK_IMAGE_REQUEST = 1;
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_start);
  
          btnchoose = (Button)findViewById(R.id.btn_addphoto);
          btnupload = (Button)findViewById(R.id.btn_upload);
          imgprofile = (ImageView)findViewById(R.id.imageView);
  
          btnchoose.setOnClickListener(new View.OnClickListener() {
              @Override
              public void onClick(View view) {
                  chooseimage();
              }
          });
  
          btnupload.setOnClickListener(new View.OnClickListener() {
              @Override
              public void onClick(View view) {
  
              }
          });
      }
  
      private void chooseimage() {
          Intent intent = new Intent();
      // Show only images, no videos or anything else
          intent.setType("image/*");
          intent.setAction(Intent.ACTION_GET_CONTENT);
      // Always show the chooser (if there are multiple options available)
          startActivityForResult(Intent.createChooser(intent, "Select Picture"), PICK_IMAGE_REQUEST);
      }
  
      @Override
      protected void onActivityResult(int requestCode, int resultCode, Intent data) {
          super.onActivityResult(requestCode, resultCode, data);
          if (requestCode == PICK_IMAGE_REQUEST &amp;&amp; resultCode == RESULT_OK) {
              filepath = data.getData();
              try {
                  Bitmap bitmap = MediaStore.Images.Media.getBitmap(getContentResolver(),filepath);
                  if (android.os.Build.VERSION.SDK_INT &lt; Build.VERSION_CODES.LOLLIPOP_MR1) {
                      Toast.makeText(StartActivity.this, "YES!", Toast.LENGTH_SHORT).show();
                      bitmap = Bitmap.createScaledBitmap(bitmap, imgprofile.getWidth(),imgprofile.getHeight(),true);
                      imgprofile.setImageBitmap(bitmap);
                  } else {
                      Toast.makeText(StartActivity.this, "YES!!!!", Toast.LENGTH_SHORT).show();
                      imgprofile.setImageBitmap(bitmap);
                  }
              } catch (IOException e) {
                  e.printStackTrace();
              }
          }
      }
  }
  </code></pre>
  
  <p>I run my app on the phone which is version 5.0.2 it does not show any response of toast.</p>