// To import the "application" module:
var application = require("application");
How to "application"
Object |
Description |
AndroidApplication |
The abstraction of an Android-specific application object. |
iOSApplication |
The abstraction of an iOS-specific application object. |
- onLaunch() Object
The main entry point event. This method is expected to return an instance of the root UI for the application.
This will be an Activity extends for Android and a RootViewController for iOS.
- onSuspend()
This method will be called when the Application is suspended.
- onResume()
This method will be called when the Application is resumed after it has been suspended.
- onExit()
This method will be called when the Application is about to exit.
- onLowMemory()
This method will be called when there is low memory on the target device.
- init( nativeApp Object )
Entry point for the module. Initializes the Application singleton and hooks application lifecycle events.
- nativeApp - Object
The instance of the platform Application object - e.g. android.app.Application