Can we bypass save and delete option in intent camera for taking image in android?

老子叫甜甜 提交于 2020-04-07 06:11:31

问题


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:


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);


来源:https://stackoverflow.com/questions/32479518/can-we-bypass-save-and-delete-option-in-intent-camera-for-taking-image-in-androi

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