Options
All
  • Public
  • Public/Protected
  • All
Menu

Class AndroidApplication

The abstraction of an Android-specific application object.

Hierarchy

Index

Constructors

constructor

Properties

_isViewBase

_isViewBase: boolean

context

context: any

The application's android Context object instance.

foregroundActivity

foregroundActivity: any

The currently active (loaded) android Activity. This property is automatically updated upon Activity events.

init

init: function

Initialized the android-specific application object with the native android.app.Application instance. This is useful when creating custom application types.

param

the android.app.Application instance that started the app.

Type declaration

    • (nativeApp: any): void
    • Parameters

      • nativeApp: any

      Returns void

nativeApp

nativeApp: any

The android Application object instance provided to the init of the module.

orientation

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

Gets the orientation of the application. Available values: "portrait", "landscape", "unknown".

packageName

packageName: string

The name of the application package.

paused

paused: boolean

True if the main application activity is not running (suspended), false otherwise.

startActivity

startActivity: any

The main (start) Activity for the application.

systemAppearance

systemAppearance: "dark" | "light"

Gets the system appearance. Available values: "dark", "light".

Static activityBackPressedEvent

activityBackPressedEvent: string

String value used when hooking to activityBackPressed event.

Static activityCreatedEvent

activityCreatedEvent: string

String value used when hooking to activityCreated event.

Static activityDestroyedEvent

activityDestroyedEvent: string

String value used when hooking to activityDestroyed event.

Static activityNewIntentEvent

activityNewIntentEvent: string

String value used when hooking to activityNewIntent event.

Static activityPausedEvent

activityPausedEvent: string

String value used when hooking to activityPaused event.

Static activityRequestPermissionsEvent

activityRequestPermissionsEvent: string

String value used when hooking to requestPermissions event.

Static activityResultEvent

activityResultEvent: string

String value used when hooking to activityResult event.

Static activityResumedEvent

activityResumedEvent: string

String value used when hooking to activityResumed event.

Static activityStartedEvent

activityStartedEvent: string

String value used when hooking to activityStarted event.

Static activityStoppedEvent

activityStoppedEvent: string

String value used when hooking to activityStopped event.

Static propertyChangeEvent

propertyChangeEvent: string

Static saveActivityStateEvent

saveActivityStateEvent: string

String value used when hooking to saveActivityState event.

Methods

_createPropertyChangeData

  • _createPropertyChangeData(propertyName: string, value: any, oldValue?: any): PropertyChangeData

_emit

  • _emit(eventNames: string): void

addEventListener

  • addEventListener(eventNames: string, callback: function, thisArg?: any): void

get

  • get(name: string): any

hasListeners

  • hasListeners(eventName: string): boolean

notify

  • notify<T>(data: T): void

notifyPropertyChange

  • notifyPropertyChange(name: string, value: any, oldValue?: any): void

off

  • off(eventNames: string, callback?: any, thisArg?: any): void

on

  • on(eventNames: string, callback: function, thisArg?: any): any
  • on(event: "activityCreated", callback: function, thisArg?: any): any
  • on(event: "activityDestroyed", callback: function, thisArg?: any): any
  • on(event: "activityStarted", callback: function, thisArg?: any): any
  • on(event: "activityPaused", callback: function, thisArg?: any): any
  • on(event: "activityResumed", callback: function, thisArg?: any): any
  • on(event: "activityStopped", callback: function, thisArg?: any): any
  • on(event: "saveActivityState", callback: function, thisArg?: any): any
  • on(event: "activityResult", callback: function, thisArg?: any): any
  • on(event: "activityBackPressed", callback: function, thisArg?: any): any
  • on(event: "activityNewIntent", callback: function, thisArg?: any): any
  • on(event: "activityRequestPermissions", callback: function, thisArg?: any): any

once

  • once(event: string, callback: function, thisArg?: any): void

registerBroadcastReceiver

  • registerBroadcastReceiver(intentFilter: string, onReceiveCallback: function): void

removeEventListener

  • removeEventListener(eventNames: string, callback?: any, thisArg?: any): void

set

  • set(name: string, value: any): void

setProperty

  • setProperty(name: string, value: any): void

unregisterBroadcastReceiver

  • unregisterBroadcastReceiver(intentFilter: string): void

Static addEventListener

  • addEventListener(eventName: string, callback: any, thisArg?: any): void

Static off

  • off(eventName: string, callback?: any, thisArg?: any): void

Static on

  • on(eventName: string, callback: any, thisArg?: any): void

Static once

  • once(eventName: string, callback: any, thisArg?: any): void

Static removeEventListener

  • removeEventListener(eventName: string, callback?: any, thisArg?: any): void

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method