Get image Uri in onActivityResult after taking photo?

后端 未结 4 729
逝去的感伤
逝去的感伤 2021-02-07 00:48

I have this code:

startActivityForResult(new Intent(MediaStore.ACTION_IMAGE_CAPTURE), CAMERA_IMAGE);

That allows that user to take a photo. Now

4条回答
  •  无人共我
    2021-02-07 01:19

    Uri uri = null;
    if(requestCode == GALLERY_INTENT && resultCode == RESULT_OK){
      uri = data.getData();
    }
    

提交回复
热议问题