• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

How can I get the Accelerometer data from android device, when screen is off

Hi!,

I am developing an Android App, which is dependent on Accelerometer data. My application is running perfectly fine as I am expecting, but the only issue is that when mobile screen is get off the sensor's accelerometer is not running that's why I am not getting any data and my application does nothing. If I keep the screen on programmatically, I get the data but it consumes the battery of device.

So can anyone have any idea or any knowledge to share, It will be highly appreciable.

In my app I am using Android version 2.1 update 1

Thank you,

Regards
Ashish Upadhyay
 
Back
Top Bottom