I have a epix (gen 2) with the AMOLED display, not using the wrist gesture option, and I'm having issues getting my watch face code to properly determine the sleep status in certain situations.
I'm using a variable that is set / cleared on the onEnterSleep() and onExitSleep() functions. Based on the forums that seems to be the usual method. This is then used to manage the display between the standard and low power faces.
On this watch, I've noticed a scenario where the the watch face app exits the sleep mode (and calls the onExitSleep() properly) and re-enters the sleep mode without calling noEnterSleep();
It seems to happen when the watch face loses focus. For example... watch face is in sleep mode as normal. The watch receives a notification from a phone via BTE, which "wakes' the watch. onExitSleep() is called, but the display moves to the notification focus. The low power timeout is only 8 seconds, and while the notification message is still on display, the backlight reduces AS IF the watch is going to sleep mode. After the 30 sec timeout for the notification, the display changes back to the watch face but the watch face app never received a call to the onEnterSleep() so it displays the standard face with the lower backlight. It will stay in this indefinitely or until something else happens.
I've seen this on multiple watch face apps, including the one I'm writing myself. Since the isSleepMode property was phased out, there doesn't seem to be a way in the APIs to verify whether the watch is in sleep mode through code. So the app can't verify it's in the right mode.
Has anyone else seen this? Or possibly have any ideas on what could be causing this? I'm not extremely good at debugging directly on the watch (I'm still very new to Garmin and MonkeyC) and the CIQ simulator doesn't seem to simulate these activities that take focus on the screen.
I would be very interested in anyone else's opinion...