Android: take camera picture intent remove confirmation dialog
Asked Answered
T

2

5

it's possible to disable/remove this photo confirmation dialog:

enter image description here

I need somehow skip this dialog but I still want use an Intent. I found this android: Take camera picture without "save" / "delete" confirmation but I don't want use SurfaceView .

Tardy answered 12/3, 2016 at 10:44 Comment(1)
L
8

I need somehow skip this dialog but I still want use an Intent.

That is not possible.

There are over 8,000 26,000 Android device models. Across them, there are hundreds of different pre-installed camera apps. Additionally, there are hundreds of additional camera apps that users can install from the Play Store or elsewhere. Any one of them could respond to your ACTION_IMAGE_CAPTURE request.

The protocol for ACTION_IMAGE_CAPTURE does not have an option for "do not show any sort of confirmation dialog". Some camera apps will have such a dialog, others will not. A few apps might have some undocumented Intent extra for controlling that behavior, but most will not.

Either:

  1. Live with the confirmation prompt, where it exists, or

  2. Do not delegate this work to a third-party app, but instead use the camera APIs to take a picture yourself (the SurfaceView approach that you rejected, though it does not necessarily need SurfaceView), or

  3. Do not write the app

Laticialaticiferous answered 12/3, 2016 at 12:27 Comment(0)
P
2

Use "android.intent.extra.quickCapture" in Intent.

Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
intent.putExtra("android.intent.extra.quickCapture",true);
Prolong answered 15/10, 2018 at 13:16 Comment(1)
for me, it is working for Lenovo VIBE device I haven't tested in another device.Prolong

© 2022 - 2024 — McMap. All rights reserved.