I am developing an Android application. I find that GPS fails to work on certain devices (Samsung Galaxy S version 2.2.1, Samsung Galaxy Ace version 2.3.6 Gingerbread, Motorola Diffy 2.2) if the screen is off. It works fine on other devices (HTC Wildfire 2.3.3), even if the screen is off. Why is this?
Share
I’m not sure if that happens, but I faced a similar problem with accelerometer. It won’t give any sensor readings when the screen is locked. So what I did was, whenever I want the sensor readings, I just took the wake lock every 5 minutes, so the screen gets ON and then I get the sensor readings. Should be useful to you. The user need not manually do anything.