Do all Android phones with a built-in camera use a folder called “DCIM” to store captured images?

你。 提交于 2019-12-12 01:28:37

问题


I am developing an app which uses the phone's default camera application to capture an image and then allow the user to perform some basic editing.

I use the following snippet...

Intentintent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
imageCaptureIntent.putExtra(MediaStore.EXTRA_OUTPUT,*<file>*);
startActivityForResult(intent, TAKE_PHOTO_CODE);

I want the image captured to be saved in a location that is consistent with the stock camera application. Can I use the DCIM folder and assume all phones will use that location?


回答1:


I would expect that the default Android camera app will save images in the DCIM folder. If for some reason a phone manufacturer customized Android with a different camera app, the default location could be different.

You could always check for the existance of the DCIM folder first, and if it doesn't exist, have some kind of a "fall back" location that's specific to your app.




回答2:


I don't recommend assuming such a thing e.g. Droid Incredible has an internal 8GB storage and I'm not sure how it stores the images inside so check that.



来源:https://stackoverflow.com/questions/4173204/do-all-android-phones-with-a-built-in-camera-use-a-folder-called-dcim-to-store

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!