Kindle Fire hibernation issue alert from Amazon

Monkey Targets Forums/Android/Kindle Fire hibernation issue alert from Amazon

benmc(Posted 2013) [#1]
I have an app on the Amazon Appstore and I just got an email from Amazon saying it has failed tests regarding hibernation. Does anyone know how to fix this? The error they gave be me is below:

============================

Bug Description:App fails for Hibernation.

Steps to recreate error:

​1. Install & launch the app
2. Tap on "Play now" button and hibernate the device.
3. The app force closes to device home screen.


OS/Device(s)/Form Factor:Kindle Fire (2nd Gen),Kindle Fire HD 7 (2nd Gen)Fire HD 8.9 Wifi (2nd Gen),Kindle Fire HD 7 (3rd Gen) and Fire HDX 7 WiFi (3rd Gen)

============================

I don't even know how to hibernate a device. I suppose that means - power off???? Tho I'm not sure. So I guess the app force closes.

Does anyone know if this issue has already been addressed in newer versions of Monkey?


Ironstorm(Posted 2013) [#2]
Hm. I think this means, they've started your app and pressed the Off-Button to shutdown the display. And when they turn on the display, your app closes and return to the device home screen.
I doesn't know any way to hibernate a device from your app.

Maybe try to reproduce this error with adb?


Snader(Posted 2013) [#3]
I had kind of the same problems when they tested my app at Samsung. I never thought of 'hibernating' (just press the power button on the tablet) when my game was just started and loading the graphics and sounds. Then the onSuspend was called which unloaded my images... to be reloaded again when onResume was called. But since the images were not all loaded in the first place, the app crashed.


AdamRedwoods(Posted 2013) [#4]
yes, android will dump your images sometimes when OnPause/OnResume is called. i believe most people reload the images on OnResume.

http://developer.android.com/reference/android/opengl/GLSurfaceView.Renderer.html
EGL Context Lost

There are situations where the EGL rendering context will be lost. This typically happens when device wakes up after going to sleep. When the EGL context is lost, all OpenGL resources (such as textures) that are associated with that context will be automatically deleted. In order to keep rendering correctly, a renderer must recreate any lost resources that it still needs. The onSurfaceCreated(GL10, EGLConfig) method is a convenient place to do this.



benmc(Posted 2013) [#5]
So do you think the solution will be to have OnResume do a re-load of all the assets? I just got a free Kindle Fire HD XD in the mail because of their mobile-ad promotion a month ago, so hopefully I can test this out now and get it working.


AdamRedwoods(Posted 2013) [#6]
So do you think the solution will be to have OnResume do a re-load of all the assets?

yes.


Wylaryzel(Posted 2013) [#7]
Wouldn't it more efficent to perform a check OnResume if the assets are still available and only reload them if they are really empty?

Will have to perform some test :-)