2

what happened if there is no space in external storage and want to capture image using MediaStore.ACTION_Image_CAPTURE intent in android ??

is the image will capture or will have crash or any thing will happen !!

because my app when capture image in samsung-dous when press ok to capture the image it reopen the camera again and again and again and don't back to activity , but in the other devices the app and camera work good

any one can help me please ,thanks for your time,

Mosa
  • 353
  • 2
  • 16

2 Answers2

1

what happened if there is no space in external storage and want to capture image using MediaStore.ACTION_Image_CAPTURE intent in android ?

That is up to the developers of the camera app that the user chooses to handle your Intent.

If you are concerned about this, check for low disk space before starting the ACTION_IMAGE_CAPTURE activity.

CommonsWare
  • 986,068
  • 189
  • 2,389
  • 2,491
  • how to know if the captured_ picture is bigger than the space i have !! i can't right ! – Mosa May 24 '17 at 13:25
  • @Mosa: That depends on how close you want to get to the limit. Set up some limit (e.g., 50MB) and do not start the camera activity if the free space is below the limit. Set that limit to be something that is big enough to handle any likely image that the camera will take. For example, a 50MB JPEG file would be *huge*. – CommonsWare May 24 '17 at 13:30
  • thanks man , this is good answer , i will accept your answer but one last thing is the problem in the question above in samsung-dous has you see it before or this is the first time ?? – Mosa May 24 '17 at 13:43
  • @Mosa: There are *many* Samsung devices with "Duos" in the name. There are *thousands* of Android device models, with *hundreds* of built-in camera apps, let alone camera apps that the user may install. No, I have not tested the camera apps on every possible device model. – CommonsWare May 24 '17 at 13:46
0

Your in build camera app will warn you about low storage space and close.

I have less than 50 reputation that why posting this as an answer

parambir singh
  • 224
  • 2
  • 13
  • 1
    thanks for your answer, dont worry about that, then the situation happened in samsung-dous not from low storage !! – Mosa May 24 '17 at 13:03