0

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?

VIAX
  • 94
  • 2
  • 11
  • Possible duplicate of [Android - Take picture without preview](https://stackoverflow.com/questions/25754597/android-take-picture-without-preview) – Oleg Skidan Sep 10 '17 at 11:25

2 Answers2

0

You can use surfaceViewe . take a look at this document SurfaceView

Behnam Eskandari
  • 1,011
  • 12
  • 27
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