Type String Event system Revision Current Public Release (2017.3184) Keywords system, type
Identifies the type of system event that occurred. It will be one of the following values:
"applicationStart" occurs when the application is launched and all code in
main.lua is executed.
"applicationExit" occurs when the user or OS task manager quits the application. Circumstances may result where this event does not fire at all or that it gets very little time to run before the operating system terminates the app, so no
"applicationSuspend" occurs when the device needs to suspend the application, such as during a phone call or if the device goes to sleep from inactivity or user action. Circumstances may result where this event has very little time to run before the operating system suspends the app, so no
"applicationResume" occurs when the application resumes after a suspend. On the device, this occurs if the application was suspended because of a phone call or sleep. In the Simulator, this corresponds to selecting Resume from the Hardware menu.
"applicationOpen" occurs when the application is asked to open a URL or file, both of which are provided via the event.url property. For Win32 desktop apps configured to be
When a user "force quits" an application, the
"applicationExit" event does not fire on any platform.
Circumstances may result where the
"applicationSuspend" events have very little time to run before the operating system terminates/suspends the app, so no
local function onSystemEvent( event ) print( "System event name and type: " .. event.name, event.type ) end Runtime:addEventListener( "system", onSystemEvent )