Creating Local Android Service
===

I created a local android service.
When user selects the start button then a service is started and an inner class which extends from Activity and implements the runnable and SensorEventListener is created.

I would like to get the x,y,z coordinates of the mobile device before and after the device is locked (screen monitor becomes off and black and the device is locked). How do I do this task?

Thanks,
Eyall