Software Archive
Read-only legacy content
17061 Discussions

Camera View Inheritance

Aglaya
Beginner
438 Views

Can a camera view be inherited by a background app or service? If the device is NOT rooted are there are background permissions that can be used to obtain access to camera and translate live events into own canvas?

0 Kudos
1 Reply
Alexander_W_Intel
438 Views

Hi,

This should be possible. Main issue you probably have is that you need to specify SurfaceHolder for the camera preview. Without specifying this you can't take a picture. For a background survice you usually don't have a surfaceholder, but you can simply create one:

[java]
SurfaceView tempSurfaceView = new SurfaceView(c);
try {
    mCamera.setPreviewDisplay(
tempSurfaceView.getHolder());
} catch (IOException e) {

}
[/java]

Hope this answer your question.

Alex

0 Kudos
Reply