title: pick an image from gallery in android studio?
body: <p>someone can tell me what the problem, it is not working, so please help fast i really need:</p>
  
  <pre><code> imagePick.setOnClickListener(new View.OnClickListener() {
          @Override
          public void onClick(View v) {
              Intent intent = new Intent();
              intent.setType("image/*");
              intent.setAction(Intent.ACTION_GET_CONTENT);
              startActivityForResult(Intent.createChooser(intent, "Select Contact Image"),1);
          }
      });
  
  
    public void onActivityResult(int reqCode, int resCode, Intent data)
  {
      if(resCode==RESULT_OK)
      {
          if(reqCode==1) {
              imageURI=data.getData();
              iv.setImageURI(data.getData());
  
          }
      }
  }
  </code></pre>