Corona App regularly exit on suspended.

Hi Corona,

I am using Nexus 5 for testing, and currently having 594MB free memory, and a few GB of storage.

My implemented this to the main.lua to monitor memory usage:

local monitorMem = function()   collectgarbage() print( "MemUsage: " .. collectgarbage("count") )   local textMem = system.getInfo( "textureMemoryUsed" ) / 1000000 print( "TexMem: " .. textMem ) end   Runtime:addEventListener( "enterFrame", monitorMem )

My app call media.selectphoto(), Android will showing the photo picking activity. This will make the app goes into suspended mode.

While picking the photo, my last MemUsage is 998KB, while my texture memory is 26MB.

If I dive deeper into photo picking activity (Access the left drawer, go into other folder etc), after done picking a photo and return to Corona app, I was expecting the app still there waiting for me to provide the image.

However, the app will show me the first scene that I see when I start the app. (means, the app already exit and destroyed while I picking photo)

How to prevent this?

In your build.settings file, do you have this:

UIApplicationExitsOnSuspend = true

If you do, either remove it completely or set it to false. This line tells the app to fully exit every time you suspend.

UIApplicationExitsOnSuspend only affects Apple iOS devices.

Is there anything going on in your “adb logcat” output?

In your build.settings file, do you have this:

UIApplicationExitsOnSuspend = true

If you do, either remove it completely or set it to false. This line tells the app to fully exit every time you suspend.

UIApplicationExitsOnSuspend only affects Apple iOS devices.

Is there anything going on in your “adb logcat” output?