Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

android - use camera from within background service

I'm trying to figure out if it is possible to use a camera video stream from within a background service rather than from a normal intent.

What I had in mind is this:

  • start the service from my app
  • this service accesses the video stream and extracts features continuously; depending on the features, it sends network packets (to localhost)
  • user switches to another app - the service must still be running and extracting features!

Before trying to implement all that, I'd like to know if it was possible.

Thanks in advance

Nicola

like image 921
Nicola Montecchio Avatar asked Nov 26 '22 10:11

Nicola Montecchio


1 Answers

yes its possible, check my answer and sample code on one similar thread

Open/Run Camera from background service in android

like image 123
Pawan Maheshwari Avatar answered Dec 04 '22 14:12

Pawan Maheshwari