i'm looking for code that will take pictures in background and save it to Bitmap. I did some research and found this: https://stackoverflow.com/a/17859926/7391954 it kinda works but it freezes UI even if I call takePicture from worker thread and it cannot take photos faster than like 1/sec (I'd like 3/sec). Can anyone help me at this?
Asked
Active
Viewed 1,325 times
2 Answers
0
You can use surfaceViewe . take a look at this document SurfaceView

Behnam Eskandari
- 1,011
- 12
- 27
-
I don't want to display preview, it has to take picture in background without UI. – VIAX Sep 10 '17 at 11:21
-
I know it, you can overlay your main view on surfaceView, or make surfaceView visibility invisible – Behnam Eskandari Sep 10 '17 at 11:23
0
Here's camera preview code that worked for me: https://stackoverflow.com/a/33242595/7391954
I overlaid my layout on it and then taking photo was as simple as calling getBitmap()
on that View.

VIAX
- 94
- 2
- 11