How do I launch the Open Camera app to take a picture without user interaction?

132 Views Asked by At

I am trying to launch the Open Camera Android app to take a picture without user interaction for meter reading logging purposes. Plenty of examples on the web to do this using Android intents with user interaction (i.e. they have to press a button) but none I can find how to do this without. Could modify the Open Camera source to do what I want but that seems like overkill if I could just use an existing application and launch it from mine.

1

There are 1 best solutions below

2
On

Plenty of examples on the web to do this using Android intents with user interaction (i.e. they have to press a button) but none I can find how to do this without.

That is because there is no option for that.

Could modify the Open Camera source to do what I want but that seems like overkill if I could just use an existing application and launch it from mine.

Or you could use an existing camera library (CameraX, FotoApparat, CameraKit-Android, etc.) and take the picture directly from your app.