How to use Camera to take picture in a background Service on Android? [duplicate]
I'm developing a Service, running in background, that uploads succesfully images and data to the web.
Now I want to upload an image taken by the Camera.
Is it possible to use the camera in a background service without preview on Android 2.2?
I found various contrastants answers on web...
How can I do it?
You can take pictures without preview with an dummy view.
like:
SurfaceView view = new SurfaceView(this);
c.setPreviewDisplay(view.getHolder());
c.startPreview();
c.takePicture(shutterCallback, rawPictureCallback, jpegPictureCallback);
It's not possible without the preview / surface view.
精彩评论