Android ACTION_IMAGE_CAPTURE Intent

后端 未结 14 2211
被撕碎了的回忆
被撕碎了的回忆 2020-11-22 02:04

We are trying to use the native camera app to let the user take a new picture. It works just fine if we leave out the EXTRA_OUTPUT extra and returns the small B

14条回答
  •  面向向阳花
    2020-11-22 02:52

    To follow up on Yenchi's comment above, the OK button will also do nothing if the camera app can't write to the directory in question.

    That means that you can't create the file in a place that's only writeable by your application (for instance, something under getCacheDir()) Something under getExternalFilesDir() ought to work, however.

    It would be nice if the camera app printed an error message to the logs if it could not write to the specified EXTRA_OUTPUT path, but I didn't find one.

提交回复
热议问题