1

I have doing a basic object detection on the camera preview screen in Android (greater than 3.2). For the devices which do not support processing on preview screen, I am buffering the preview screen, processing it and clearing the buffer. This part is working as desired.

What I now want is this app to run in the background while any other app is running in the foreground. I am using android service and am able to run a small test app in the background. However my concern is with the camera preview app.

I don't want to display the preview screen but use the preview screen information for processing. This might be too much to ask, but I wanted to know if this is even possible. I came across this link which shows some hope. Basically I want to process the video (preview) stream without displaying it on the screen. If this is doable, then I can think of putting this app in the background and some other app in the foreground.

Unfortunately I won't be able to share the code, however it is the standard logic of creating a surface view and starting the preview.

I would really appreciate any insight into this.

Community
  • 1
  • 1
axs
  • 1,156
  • 1
  • 10
  • 15

1 Answers1

0

Check comments here.Basically he opens camera hardware, set preview callback and do startpreview without setting the previewDisplay (this might not work on every device). You can try this from your background service. All this will work if your foreground doesn't access the camera app. Please update this if it works. I am interested to know.

Community
  • 1
  • 1
vikky.rk
  • 3,989
  • 5
  • 29
  • 32
  • Thanks for the link and the idea, I will give it a try and will surely update if it works. – axs Jul 21 '12 at 18:02