I am stuck into a problem programming an android application, using Java. I am implementing a Service, since my application should run in background, without affecting the other functionalities of the device.
I should access to camera device, I just need to grub the current camera frame within a given framerate. I am a bit confused, since it seems that I cannot access to camera without a view panel (and, since I am programming a service, I don't have a view panel).
I have tried different solutions found online, but no one of them works. I am using Andoird 6.0 (sdk 23). Do you have any hints?
------------ EDIT ------------------
Why should a service access to the camera?
I am working on a robotic system that is interfaced via a set of android API (the robot is composed of 2-layers. One is a standard computer that is not accessible, the other is the android layer with its API). Along with the APIs, the tablet has also different sensors, like a standard tablet camera.
I am developing an interface to get its sensors and make available the APIs via network, enabling the robot to be controlled without writing proper android applications on the robot. I have quite finished, and everything runs in a service, so the user will not lose the control of the robot tablet. However, I am not able to stream the camera data.
Regards,