Do all Android phones with a built-in camera use a

2019-08-17 01:47发布

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?

2条回答
姐就是有狂的资本
2楼-- · 2019-08-17 02:02

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.

查看更多
【Aperson】
3楼-- · 2019-08-17 02:23

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.

查看更多
登录 后发表回答