I have a cloud compiled CocoonJS app that I'm testing on Android devices. The issue seems to vary from device to device, but basically here's what happens. When the screen times out, the game breaks in some way. Unlocking the device to resume the game has varying results: screen goes completely black or white and won't resume, the graphics get either shrunk, offset, or streched oddly making it unplayable, or the device locks up completely, requiring a reboot. Most of the time, it just takes hitting the back button to exit out of the app, and relaunching it to get things back to normal. (Note: On my Android tablet, it works great and I can even swap between other apps and back to it, and it'll resume properly.)
Has anyone else experienced any similar problems with resuming their games, after the screen times out? Does anyone have any tips for a workaround or is there a way to prevent the screen from timing out?
The two devices I've tested this are on Gingerbead Android 2.3, and maybe it has to do with the lock screens being in the portrait orientation... so, that when it tries to resume the game, you'll see it switching to the landscape orientation and that's when things break. (My tablet is running Android 4.0 ICS, and the lock screen is landscape orientation, so maybe that's why it works?) I'm using scale mode with an oversized background sprite, and some anchored sprites.
I can post a capx file later tonight if that'll help. Similar behavior can be found even when letting the screen timeout while in the Cocoon JS launcher, so it'd be easy to verify.
Added some screenshots of the Before and After to clarify the issue.