Preview 2.0 is now in Public Beta!
Read the Announcement
AndroidApplication

Summary

Constructors

constructor

Properties

backgrounded

backgrounded: boolean

context

foregroundActivity

foregroundActivity: any

init

init: (nativeApp: any) => void

nativeApp

orientation

orientation: "portrait" | "landscape" | "unknown"

packageName

paused

startActivity

systemAppearance

systemAppearance: "dark" | "light"

activityBackPressedEvent

Static
activityBackPressedEvent: string

activityCreatedEvent

Static
activityCreatedEvent: string

activityDestroyedEvent

Static
activityDestroyedEvent: string

activityNewIntentEvent

Static
activityNewIntentEvent: string

activityPausedEvent

Static
activityPausedEvent: string

activityRequestPermissionsEvent

Static
activityRequestPermissionsEvent: string

activityResultEvent

Static
activityResultEvent: string

activityResumedEvent

Static
activityResumedEvent: string

activityStartedEvent

Static
activityStartedEvent: string

activityStoppedEvent

Static
activityStoppedEvent: string

saveActivityStateEvent

Static
saveActivityStateEvent: string

Methods

getRegisteredBroadcastReceiver

getRegisteredBroadcastReceiver(intentFilter: string): any
Parameter Default Description
intentFilter
string

Returns any

on

on(eventNames: string, callback: (data: AndroidActivityEventData) => void, thisArg?: any): any
Parameter Default Description
eventNames
string

callback
(data: AndroidActivityEventData) => void

thisArg
any

Returns any
on(event: "activityCreated", callback: (args: AndroidActivityBundleEventData) => void, thisArg?: any): any
Parameter Default Description
event
"activityCreated"

callback

thisArg
any

Returns any
on(event: "activityDestroyed", callback: (args: AndroidActivityEventData) => void, thisArg?: any): any
Parameter Default Description
event
"activityDestroyed"

callback
(args: AndroidActivityEventData) => void

thisArg
any

Returns any
on(event: "activityStarted", callback: (args: AndroidActivityEventData) => void, thisArg?: any): any
Parameter Default Description
event
"activityStarted"

callback
(args: AndroidActivityEventData) => void

thisArg
any

Returns any
on(event: "activityPaused", callback: (args: AndroidActivityEventData) => void, thisArg?: any): any
Parameter Default Description
event
"activityPaused"

callback
(args: AndroidActivityEventData) => void

thisArg
any

Returns any
on(event: "activityResumed", callback: (args: AndroidActivityEventData) => void, thisArg?: any): any
Parameter Default Description
event
"activityResumed"

callback
(args: AndroidActivityEventData) => void

thisArg
any

Returns any
on(event: "activityStopped", callback: (args: AndroidActivityEventData) => void, thisArg?: any): any
Parameter Default Description
event
"activityStopped"

callback
(args: AndroidActivityEventData) => void

thisArg
any

Returns any
on(event: "saveActivityState", callback: (args: AndroidActivityBundleEventData) => void, thisArg?: any): any
Parameter Default Description
event
"saveActivityState"

callback

thisArg
any

Returns any
on(event: "activityResult", callback: (args: AndroidActivityResultEventData) => void, thisArg?: any): any
Parameter Default Description
event
"activityResult"

callback

thisArg
any

Returns any
on(event: "activityBackPressed", callback: (args: AndroidActivityBackPressedEventData) => void, thisArg?: any): any
Parameter Default Description
event
"activityBackPressed"

callback

thisArg
any

Returns any
on(event: "activityNewIntent", callback: (args: AndroidActivityNewIntentEventData) => void, thisArg?: any): any
Parameter Default Description
event
"activityNewIntent"

callback

thisArg
any

Returns any
on(event: "activityRequestPermissions", callback: (args: AndroidActivityRequestPermissionsEventData) => void, thisArg?: any): any
Parameter Default Description
event
"activityRequestPermissions"

callback

thisArg
any

Returns any

registerBroadcastReceiver

registerBroadcastReceiver(
  intentFilter: string,
  onReceiveCallback: (context: any, intent: any) => void
): void
Parameter Default Description
intentFilter
string

onReceiveCallback
(context: any, intent: any) => void

Returns void

unregisterBroadcastReceiver

unregisterBroadcastReceiver(intentFilter: string): void
Parameter Default Description
intentFilter
string

Returns void