开发者

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

I am developing an app which use开发者_开发百科s 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?


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.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜