How to keep my accelerometer off screen

I had a problem with my accelerometer not working with the screen off. When I turned off the screen, logcat says the tag: β€œAK8973” with a decaption: β€œcompass is off” Is there a way to prevent my accelerometer from sleeping when the screen is off? My platform is Android 2.2 with HTC Desire. Thank you very much for your help!

+3
source share
2 answers

Is there a way to speed up the accelerometer when the screen is off?

At best, you can try to hold WakeLock. Your users will be angry with you if they feel that you are wasting your battery. And I'm not sure if this works either.

0
source

onPause(), onStop() onDestroy() , .

0

All Articles