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!
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.
WakeLock
onPause(), onStop() onDestroy() , .
onPause()
onStop()
onDestroy()