applicationResume on app start (onSystemEvents)

It looks like on devices you get an applicationResume event on application start. Has something changed? Did not used to be like this.

https://docs.coronalabs.com/guide/events/detectEvents/index.html#runtime-events

I fixed for me like this;

if event.type == "applicationSuspend" then&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print("-- SUSPEND --") elseif event.type == "applicationResume" then &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; local st = system.getTimer() &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if st \< 2000 then &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print("not true resume") &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return &nbsp; &nbsp; &nbsp; &nbsp; end &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print("-- RESUME --") ...

What device are you testing on? What version of the operating system are you running on?

What type of activities are you doing in your main.lua? (logging in to game networks, etc., Facebook, etc.?)

Rob

iPhone 6. 10.3.3 (14G60). It only happens on my phone, didn’t happen on simulator. (and only since the 2017. SDK)

this guy seems to be saying something similar from May: https://forums.coronalabs.com/topic/68726-app-runs-fine-in-simulator-and-using-live-build-but-crashes-when-i-use-a-development-build-after-launch-screen-is-displayed/

Can you make a small sample app that shows the problem? It needs a main.lua, config.lua and build.settings and any assets so we can build and install it on a device and see the problem.

Put that in a .zip file and use the Report a bug link at the top of the page please.

Thanks

Rob

done

I fixed for me like this;

if event.type == "applicationSuspend" then&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print("-- SUSPEND --") elseif event.type == "applicationResume" then &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; local st = system.getTimer() &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if st \< 2000 then &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print("not true resume") &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return &nbsp; &nbsp; &nbsp; &nbsp; end &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print("-- RESUME --") ...

What device are you testing on? What version of the operating system are you running on?

What type of activities are you doing in your main.lua? (logging in to game networks, etc., Facebook, etc.?)

Rob

iPhone 6. 10.3.3 (14G60). It only happens on my phone, didn’t happen on simulator. (and only since the 2017. SDK)

this guy seems to be saying something similar from May: https://forums.coronalabs.com/topic/68726-app-runs-fine-in-simulator-and-using-live-build-but-crashes-when-i-use-a-development-build-after-launch-screen-is-displayed/

Can you make a small sample app that shows the problem? It needs a main.lua, config.lua and build.settings and any assets so we can build and install it on a device and see the problem.

Put that in a .zip file and use the Report a bug link at the top of the page please.

Thanks

Rob

done