Note: You are on the beta version of our docs. This is a work in progress and may contain broken links and pages. 
Classes
AndroidApplication
AndroidApplication
Summary 
Properties
- activityBackPressedEvent
 - activityBackPressedEvent
 - activityCreatedEvent
 - activityCreatedEvent
 - activityDestroyedEvent
 - activityDestroyedEvent
 - activityNewIntentEvent
 - activityNewIntentEvent
 - activityPausedEvent
 - activityPausedEvent
 - activityRequestPermissionsEvent
 - activityRequestPermissionsEvent
 - activityResultEvent
 - activityResultEvent
 - activityResumedEvent
 - activityResumedEvent
 - activityStartedEvent
 - activityStartedEvent
 - activityStoppedEvent
 - activityStoppedEvent
 - saveActivityStateEvent
 - saveActivityStateEvent
 
Accessors
Properties 
activityBackPressedEvent 
Readonly
activityCreatedEvent 
Readonly
activityDestroyedEvent 
Readonly
activityNewIntentEvent 
Readonly
activityPausedEvent 
Readonly
activityRequestPermissionsEvent 
Readonly
activityResultEvent 
Readonly
activityResumedEvent 
Readonly
activityStartedEvent 
Readonly
activityStoppedEvent 
Readonly
saveActivityStateEvent 
Readonly
activityBackPressedEvent 
StaticReadonly
activityCreatedEvent 
StaticReadonly
activityDestroyedEvent 
StaticReadonly
activityNewIntentEvent 
StaticReadonly
activityPausedEvent 
StaticReadonly
activityRequestPermissionsEvent 
StaticReadonly
activityResultEvent 
StaticReadonly
activityResumedEvent 
StaticReadonly
activityStartedEvent 
StaticReadonly
activityStoppedEvent 
StaticReadonly
saveActivityStateEvent 
StaticReadonly
Accessors 
backgrounded 
 Returns boolean
context 
 Returns Context
foregroundActivity 
The currently active (loaded) [android Activity](http://developer.android.com/reference/android/app/Activity.html).
This property is automatically updated upon Activity events.
 Returns AppCompatActivity
nativeApp 
The [android Application](http://developer.android.com/reference/android/app/Application.html) object instance provided to the init of the module.
 Returns Application
packageName 
 Returns string
paused 
 Returns boolean
startActivity 
The main (start) Activity for the application.
 Returns AppCompatActivity
Methods 
getNativeApplication 
 Returns Application
getRegisteredBroadcastReceiver 
Get a registered BroadcastReceiver, then you can get the result code of BroadcastReceiver in onReceiveCallback method.
| Parameter | Default | Description | 
intentFilter |  | stringA string containing the intent filter.  | 
 Returns BroadcastReceiver
on 
on(
  event: "activityCreated",
  callback: (args: AndroidActivityBundleEventData) => void,
  thisArg?: any
): void| Parameter | Default | Description | 
event |  | "activityCreated" | 
callback |  | (args: AndroidActivityBundleEventData) => void | 
thisArg |  | any | 
 Returns void
on(
  event: "activityDestroyed",
  callback: (args: AndroidActivityEventData) => void,
  thisArg?: any
): voidThis event is raised when application css is changed.
| Parameter | Default | Description | 
event |  | "activityDestroyed" | 
callback |  | (args: AndroidActivityEventData) => void | 
thisArg |  | any | 
 Returns void
on(
  event: "activityStarted",
  callback: (args: AndroidActivityEventData) => void,
  thisArg?: any
): voidEvent raised then livesync operation is performed.
| Parameter | Default | Description | 
event |  | "activityStarted" | 
callback |  | (args: AndroidActivityEventData) => void | 
thisArg |  | any | 
 Returns void
on(
  event: "activityPaused",
  callback: (args: AndroidActivityEventData) => void,
  thisArg?: any
): voidThis event is raised when application css is changed.
| Parameter | Default | Description | 
event |  | "activityPaused" | 
callback |  | (args: AndroidActivityEventData) => void | 
thisArg |  | any | 
 Returns void
on(
  event: "activityResumed",
  callback: (args: AndroidActivityEventData) => void,
  thisArg?: any
): voidThis event is raised on application launchEvent.
| Parameter | Default | Description | 
event |  | "activityResumed" | 
callback |  | (args: AndroidActivityEventData) => void | 
thisArg |  | any | 
 Returns void
on(
  event: "activityStopped",
  callback: (args: AndroidActivityEventData) => void,
  thisArg?: any
): voidThis event is raised after the application has performed most of its startup actions.
Its intent is to be suitable for measuring app startup times.
| Parameter | Default | Description | 
event |  | "activityStopped" | 
callback |  | (args: AndroidActivityEventData) => void | 
thisArg |  | any | 
 Returns void
on(
  event: "saveActivityState",
  callback: (args: AndroidActivityBundleEventData) => void,
  thisArg?: any
): voidThis event is raised when the Application is suspended.
| Parameter | Default | Description | 
event |  | "saveActivityState" | 
callback |  | (args: AndroidActivityBundleEventData) => void | 
thisArg |  | any | 
 Returns void
on(
  event: "activityResult",
  callback: (args: AndroidActivityResultEventData) => void,
  thisArg?: any
): voidThis event is raised when the Application is resumed after it has been suspended.
| Parameter | Default | Description | 
event |  | "activityResult" | 
callback |  | (args: AndroidActivityResultEventData) => void | 
thisArg |  | any | 
 Returns void
on(
  event: "activityBackPressed",
  callback: (args: AndroidActivityBackPressedEventData) => void,
  thisArg?: any
): voidThis event is raised when the Application is about to exit.
| Parameter | Default | Description | 
event |  | "activityBackPressed" | 
callback |  | (args: AndroidActivityBackPressedEventData) => void | 
thisArg |  | any | 
 Returns void
on(
  event: "activityNewIntent",
  callback: (args: AndroidActivityNewIntentEventData) => void,
  thisArg?: any
): voidThis event is raised when there is low memory on the target device.
| Parameter | Default | Description | 
event |  | "activityNewIntent" | 
callback |  | (args: AndroidActivityNewIntentEventData) => void | 
thisArg |  | any | 
 Returns void
on(
  event: "activityRequestPermissions",
  callback: (args: AndroidActivityRequestPermissionsEventData) => void,
  thisArg?: any
): voidThis event is raised when an uncaught error occurs while the application is running.
| Parameter | Default | Description | 
event |  | "activityRequestPermissions" | 
callback |  | (args: AndroidActivityRequestPermissionsEventData) => void | 
thisArg |  | any | 
 Returns void
registerBroadcastReceiver 
registerBroadcastReceiver(
  intentFilter: string,
  onReceiveCallback: (context: Context, intent: Intent) => void
): voidRegister a BroadcastReceiver to be run in the main activity thread. The receiver will be called with any broadcast Intent that matches filter, in the main application thread.
For more information, please visit 'http://developer.android.com/reference/android/content/Context.html#registerReceiver%28android.content.BroadcastReceiver,%20android.content.IntentFilter%29'
| Parameter | Default | Description | 
intentFilter |  | stringA string containing the intent filter.  | 
onReceiveCallback |  | (context: Context, intent: Intent) => voidA callback function that will be called each time the receiver receives a broadcast.  | 
 Returns void
unregisterBroadcastReceiver 
Unregister a previously registered BroadcastReceiver.
For more information, please visit 'http://developer.android.com/reference/android/content/Context.html#unregisterReceiver(android.content.BroadcastReceiver)'
| Parameter | Default | Description | 
intentFilter |  | stringA string containing the intent filter with which the receiver was originally registered.  | 
 Returns void
- Previous
 - ActivityIndicator
 - Next
 - Animation