Reputation: 41
I have a program that reads and writes all the sensors values file, but when you turn off the screen stops the listener on the sensors and the record on txt file. I already tried with the wake lock, but with little success, I want to know if you have ideas or if I have to resort to a wake to keep me always on the monitor, let me know. thanks
Upvotes: 0
Views: 182
Reputation: 23655
You better should use a Service for listening to the sensors. I did so with my Sports Tracker app and ist works fine.
Upvotes: 1
Reputation: 1362
At least the GPS system (LocationManager.requestLocationUpdates) is working with a wakelock when the screen is turned off. I don't know about the other sensors. (you tagged GPS with your question)
Upvotes: 0