Open ntvsx193 opened 10 years ago
I will check this issue recently. Could you let me know which version did you use?
@Override
public void onDestroy() {
CV.logi("onDestroy");
// if (mIsRegistered)
// unregisterSensor();
super.onDestroy();
}
Comment unregisterSensor in onDestroy function in SensorMonitorService.java and the SLEEP mode works fine for me.
It seems that once the app activates the SLEEP option, it restarts the service by calling unregisterSensor and registerSensor. And in the unregisterSensor function the app will call stopSelf to invoke onDestroy.
However, the onDestroy function is executed after (NOT BEFORE, it is strange...) registerSensor, so the unregisterSensor in the onDestroy function will be called again.
+1, latest version on google play
Thanks a lot~ I will try to add this modification and see how it goes. :D
I have set time sleep start time - 01:00 AM sleep end time - 08:00 AM
Current time will be 22:18 (10:18 PM) - app be sleep! If i set start time more AM, end more PM - app correct running.