Pressure sensor stops when screen is off

alpinista82

Senior Member
Sep 22, 2012
173
69
0
Hello,
I am writing an application that uses the built-in pressure sensor. I experienced that after the screen has gone dark the pressure sensor stops delivering data. The onSensorChanged() method of the SensorEventListener never gets called when the screen is off. When the screen is switched on the sensor immediately starts providing samples again. I tried setting a wakelock, unregistering and re-registering the SensorEventListener triggered by a ScreenOff Action, running the service that hosts the listener in foreground - nothing works. I use the latest stable version of slim bean but I doubt that using stock rom would behave differently. Has anyone tried this before and maybe even found a workaround? Any hints that point me in the right direction appreciated. Same Code works as expected on a Nexus4.
Best Regards
Paul
 
Last edited:

alpinista82

Senior Member
Sep 22, 2012
173
69
0
Just guessing, but maybe the sensor is turned off by kernel

Gesendet von meinem GT-N7105 mit Tapatalk 2
Yeah, it seems like this is something beyond my influence. The sensor is a fabric by Bosch, but I don't even know where to find the relevant files in kernel source. Maybe I just disable that feature for the Samsung devices. Thanks, anyways. And cheers from Cologne. Tomorrow half the town is going to be drunk here because of 11.11....
 
  • Like
Reactions: DerTeufel1980
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone