سؤال

I am developing an Android application that relies heavily on the accelerometer. Because of this, I really need to make sure that the onResume and onPause events are handled correctly.

My application works perfectly when WidgetLocker is disabled, but after I lock the screen and return to the application when WidgetLocker is enabled, the application freezes, and I have to kill the process before it responds again.

My assumption is that one of the events, onPause, or onResume is not being run so the accelerometer is being registered twice, or unregistered twice.

Is there a way to make sure that the events will be hit, or program for a case when they are not hit? I have not had any trouble with other application and WidgetLocker, so I assume that I am doing something wrong.

لا يوجد حل صحيح

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top