capturing images with MediaStore.ACTION_IMAGE_CAPTURE intent in android

前端 未结 2 1285
甜味超标
甜味超标 2020-11-30 04:11

I am capturing images using MediaStore.ACTION_IMAGE_CAPTURE intent. it is working fine in most of the devices. but it is not working correctly in some latest android device

2条回答
  •  鱼传尺愫
    2020-11-30 04:47

    My onActivityResult() method looks like this and it works in obtaining the image from MediaStore.ACTION_IMAGE_CAPTURE:

    public void onActivityResult(int requestCode, int resultCode, Intent data) {
        if (resultCode == RESULT_OK) {
            Bundle extras = data.getExtras();
            Bitmap mImageBitmap = (Bitmap) extras.get("data");
        }
    }
    

提交回复
热议问题