Samsung Intent For OnActivityResult coming Null when call camera

前端 未结 1 777
离开以前
离开以前 2021-01-22 06:25

I am using following code to get picture from camera. Except samsung it is working fine in other mobiles. please let me know what i am doing wrong.

 final File r         


        
1条回答
  •  自闭症患者
    2021-01-22 06:52

    Except samsung it is working fine in other mobiles

    No, it is only working with the camera apps on the devices that you have tried. It generally will not work for ACTION_IMAGE_CAPTURE.

    please let me know what i am doing wrong

    You are assuming that ACTION_IMAGE_CAPTURE is supposed to return a result Intent. It is not required when you provide EXTRA_OUTPUT. You know where you asked for the image to be saved (the value you supplied to EXTRA_OUTPUT, so go look there for the image.

    Note that there are some buggy camera apps that will ignore EXTRA_OUTPUT (storing the image where they want), so if the image from your ACTION_IMAGE_CAPTURE request is not in EXTRA_OUTPUT, you are out of luck.

    0 讨论(0)
提交回复
热议问题