I'm building an Android application which uses accelerometer sensor and sends the value of x-axis, y-axis and z-axis to my server, but the problem is when the screen turns off, accelerometer stops working or in other words stops sending data.
How can I fix this? I'm newbie to Android application development.