2

I want to by pass save and delete option on taking image from Android Intent Camera, without using custom camera. Save image directly just capturing image.

1 Answers1

7

There is a "quick capture" mode in Android stock camera, at least in Android 5.0 and 5.1, it works as intended on Nexus but does not work on my Samsung phone, because of custom Samsung camera app. Also I'm not sure it will work on older versions of Android.

Test it from ADB shell:

adb shell am start -a android.media.action.IMAGE_CAPTURE --ez android.intent.extra.quickCapture 1

And Java code would be something like this:

Intent intent = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE);
intent.putExtra("android.intent.extra.quickCapture", true);
pelya
  • 4,326
  • 2
  • 24
  • 23
  • This is one of the vulnerabilities that have been [recently sealed](https://arstechnica.com/information-technology/2019/11/google-samsung-fix-android-spying-flaw-other-makers-may-still-be-vulnerable/), isn't it? – Alex Cohn Nov 21 '19 at 16:19
  • 1
    Looks like it might be that vulnerability. Intent name is different though, and user still must press the shutter button, so the only way to know if this API still works is to test it on Pixel. – pelya Nov 21 '19 at 18:32
  • Right, this is a different **extra**, and you are right, *per se* it's not a vulnerability. Thanks! – Alex Cohn Nov 24 '19 at 08:31