NativeScript 9.1 Released → V8 14.9, Vite 8 HMR, built for rapid agentic visual iteration
Dig in

Defined in: application/application.d.ts:53

Extends ​

Properties ​

_windows ​

ts
protected _windows: NativeWindow[];

Defined in: application/application-common.ts

Inherited from ​

ApplicationCommon._windows


activityBackPressedEvent ​

ts
readonly activityBackPressedEvent: "activityBackPressed" = 'activityBackPressed';

Defined in: application/application.d.ts:74


activityCreatedEvent ​

ts
readonly activityCreatedEvent: "activityCreated" = 'activityCreated';

Defined in: application/application.d.ts:66


activityDestroyedEvent ​

ts
readonly activityDestroyedEvent: "activityDestroyed" = 'activityDestroyed';

Defined in: application/application.d.ts:67


activityNewIntentEvent ​

ts
readonly activityNewIntentEvent: "activityNewIntent" = 'activityNewIntent';

Defined in: application/application.d.ts:75


activityPausedEvent ​

ts
readonly activityPausedEvent: "activityPaused" = 'activityPaused';

Defined in: application/application.d.ts:69


activityRequestPermissionsEvent ​

ts
readonly activityRequestPermissionsEvent: "activityRequestPermissions" = 'activityRequestPermissions';

Defined in: application/application.d.ts:76


activityResultEvent ​

ts
readonly activityResultEvent: "activityResult" = 'activityResult';

Defined in: application/application.d.ts:73


activityResumedEvent ​

ts
readonly activityResumedEvent: "activityResumed" = 'activityResumed';

Defined in: application/application.d.ts:70


activityStartedEvent ​

ts
readonly activityStartedEvent: "activityStarted" = 'activityStarted';

Defined in: application/application.d.ts:68


activityStoppedEvent ​

ts
readonly activityStoppedEvent: "activityStopped" = 'activityStopped';

Defined in: application/application.d.ts:71


backgroundEvent ​

ts
readonly backgroundEvent: "background" = "background";

Defined in: application/application-common.ts

Inherited from ​

ApplicationCommon.backgroundEvent


cssChangedEvent ​

ts
readonly cssChangedEvent: "cssChanged" = "cssChanged";

Defined in: application/application-common.ts

Inherited from ​

ApplicationCommon.cssChangedEvent


discardedErrorEvent ​

ts
readonly discardedErrorEvent: "discardedError" = "discardedError";

Defined in: application/application-common.ts

Inherited from ​

ApplicationCommon.discardedErrorEvent


displayedEvent ​

ts
readonly displayedEvent: "displayed" = "displayed";

Defined in: application/application-common.ts

Inherited from ​

ApplicationCommon.displayedEvent


exitEvent ​

ts
readonly exitEvent: "exit" = "exit";

Defined in: application/application-common.ts

On Android, raised when the last window closes; the process may stay alive. On iOS, raised when the process itself terminates.

Inherited from ​

ApplicationCommon.exitEvent


fontScaleChangedEvent ​

ts
readonly fontScaleChangedEvent: "fontScaleChanged" = "fontScaleChanged";

Defined in: application/application-common.ts

Inherited from ​

ApplicationCommon.fontScaleChangedEvent


foregroundEvent ​

ts
readonly foregroundEvent: "foreground" = "foreground";

Defined in: application/application-common.ts

Inherited from ​

ApplicationCommon.foregroundEvent


hasListeners ​

ts
hasListeners: (eventName: string) => boolean;

Defined in: application/application-common.ts

Parameters ​

ParameterType
eventNamestring

Returns ​

boolean

Inherited from ​

ApplicationCommon.hasListeners


initRootViewEvent ​

ts
readonly initRootViewEvent: "initRootView" = "initRootView";

Defined in: application/application-common.ts

Inherited from ​

ApplicationCommon.initRootViewEvent


launchEvent ​

ts
readonly launchEvent: "launch" = "launch";

Defined in: application/application-common.ts

Deprecated ​

Use the 'ready' event for application initialization and Application.setWindowContentResolver() to provide window UI. 'launch' continues to fire before the first window's content is created, and its 'root' property is still honored, for backwards compatibility. It never fires for additional windows. In a scene-based app it fires with the first window's content, so a background launch that connects no scene does not raise it.

Inherited from ​

ApplicationCommon.launchEvent


layoutDirectionChangedEvent ​

ts
readonly layoutDirectionChangedEvent: "layoutDirectionChanged" = "layoutDirectionChanged";

Defined in: application/application-common.ts

Inherited from ​

ApplicationCommon.layoutDirectionChangedEvent


livesyncEvent ​

ts
readonly livesyncEvent: "livesync" = "livesync";

Defined in: application/application-common.ts

Inherited from ​

ApplicationCommon.livesyncEvent


loadAppCssEvent ​

ts
readonly loadAppCssEvent: "loadAppCss" = "loadAppCss";

Defined in: application/application-common.ts

Inherited from ​

ApplicationCommon.loadAppCssEvent


lowMemoryEvent ​

ts
readonly lowMemoryEvent: "lowMemory" = "lowMemory";

Defined in: application/application-common.ts

Inherited from ​

ApplicationCommon.lowMemoryEvent


mainEntry ​

ts
protected mainEntry: NavigationEntry;

Defined in: application/application-common.ts

Inherited from ​

ApplicationCommon.mainEntry


notify ​

ts
notify: <T>(eventData: T) => void;

Defined in: application/application-common.ts

Type Parameters ​

Type ParameterDefault type
TApplicationEventData

Parameters ​

ParameterType
eventDataT

Returns ​

void

Inherited from ​

ApplicationCommon.notify


off ​

ts
off: (eventNames: string, callback?: any, thisArg?: any) => void;

Defined in: application/application-common.ts

Parameters ​

ParameterType
eventNamesstring
callback?any
thisArg?any

Returns ​

void

Inherited from ​

ApplicationCommon.off


on ​

ts
on: AndroidApplicationOn;

Defined in: application/application.d.ts:78

Overrides ​

ApplicationCommon.on


once ​

ts
once: {
  (eventNames: string, callback: (args: ApplicationEventData) => void, thisArg?: any): void;
  (event: "cssChanged", callback: (args: CssChangedEventData) => void, thisArg?: any): void;
  (event: "livesync", callback: (args: ApplicationEventData) => void, thisArg?: any): void;
  (event: "launch", callback: (args: LaunchEventData) => void, thisArg?: any): void;
  (event: "ready", callback: (args: ApplicationEventData) => void, thisArg?: any): void;
  (event: "displayed", callback: (args: ApplicationEventData) => void, thisArg?: any): void;
  (event: "suspend", callback: (args: ApplicationEventData) => void, thisArg?: any): void;
  (event: "resume", callback: (args: ApplicationEventData) => void, thisArg?: any): void;
  (event: "exit", callback: (args: ApplicationEventData) => void, thisArg?: any): void;
  (event: "lowMemory", callback: (args: ApplicationEventData) => void, thisArg?: any): void;
  (event: "uncaughtError", callback: (args: UnhandledErrorEventData) => void, thisArg?: any): void;
  (event: "discardedError", callback: (args: DiscardedErrorEventData) => void, thisArg?: any): void;
  (event: "orientationChanged", callback: (args: OrientationChangedEventData) => void, thisArg?: any): void;
  (event: "systemAppearanceChanged", callback: (args: SystemAppearanceChangedEventData) => void, thisArg?: any): void;
  (event: "layoutDirectionChanged", callback: (args: LayoutDirectionChangedEventData) => void, thisArg?: any): void;
  (event: "fontScaleChanged", callback: (args: FontScaleChangedEventData) => void, thisArg?: any): void;
  (event: "windowOpen", callback: (args: WindowOpenEventData) => void, thisArg?: any): void;
  (event: "windowClose", callback: (args: WindowCloseEventData) => void, thisArg?: any): void;
  (event: "primaryWindowChanged", callback: (args: PrimaryWindowChangedEventData) => void, thisArg?: any): void;
  (event: "sceneOpenURLContexts", callback: (args: SceneOpenURLContextsEventData) => void, thisArg?: any): void;
  (event: "sceneContinueUserActivity", callback: (args: SceneContinueUserActivityEventData) => void, thisArg?: any): void;
  (event: "scenePerformActionForShortcutItem", callback: (args: ScenePerformActionForShortcutItemEventData) => void, thisArg?: any): void;
};

Defined in: application/application-common.ts

Call Signature ​

ts
(
   eventNames: string, 
   callback: (args: ApplicationEventData) => void, 
   thisArg?: any): void;
Parameters ​
ParameterType
eventNamesstring
callback(args: ApplicationEventData) => void
thisArg?any
Returns ​

void

Call Signature ​

ts
(
   event: "cssChanged", 
   callback: (args: CssChangedEventData) => void, 
   thisArg?: any): void;

This event is raised when application css is changed.

Parameters ​
ParameterType
event"cssChanged"
callback(args: CssChangedEventData) => void
thisArg?any
Returns ​

void

Call Signature ​

ts
(
   event: "livesync", 
   callback: (args: ApplicationEventData) => void, 
   thisArg?: any): void;

Event raised then livesync operation is performed.

Parameters ​
ParameterType
event"livesync"
callback(args: ApplicationEventData) => void
thisArg?any
Returns ​

void

Call Signature ​

ts
(
   event: "launch", 
   callback: (args: LaunchEventData) => void, 
   thisArg?: any): void;

This event is raised on application launchEvent.

Parameters ​
ParameterType
event"launch"
callback(args: LaunchEventData) => void
thisArg?any
Returns ​

void

Call Signature ​

ts
(
   event: "ready", 
   callback: (args: ApplicationEventData) => void, 
   thisArg?: any): void;

This event is raised once the JS context is initialized.

Parameters ​
ParameterType
event"ready"
callback(args: ApplicationEventData) => void
thisArg?any
Returns ​

void

Call Signature ​

ts
(
   event: "displayed", 
   callback: (args: ApplicationEventData) => void, 
   thisArg?: any): void;

Experimental

This event is raised after the application has performed most of its startup actions. Its intent is to be suitable for measuring app startup times.

Parameters ​
ParameterType
event"displayed"
callback(args: ApplicationEventData) => void
thisArg?any
Returns ​

void

Call Signature ​

ts
(
   event: "suspend", 
   callback: (args: ApplicationEventData) => void, 
   thisArg?: any): void;

This event is raised when the Application is suspended.

Parameters ​
ParameterType
event"suspend"
callback(args: ApplicationEventData) => void
thisArg?any
Returns ​

void

Call Signature ​

ts
(
   event: "resume", 
   callback: (args: ApplicationEventData) => void, 
   thisArg?: any): void;

This event is raised when the Application is resumed after it has been suspended.

Parameters ​
ParameterType
event"resume"
callback(args: ApplicationEventData) => void
thisArg?any
Returns ​

void

Call Signature ​

ts
(
   event: "exit", 
   callback: (args: ApplicationEventData) => void, 
   thisArg?: any): void;

This event is raised when the Application is about to exit.

On Android it is raised when the last window closes; the process may stay alive. On iOS it is raised when the process itself terminates.

Parameters ​
ParameterType
event"exit"
callback(args: ApplicationEventData) => void
thisArg?any
Returns ​

void

Call Signature ​

ts
(
   event: "lowMemory", 
   callback: (args: ApplicationEventData) => void, 
   thisArg?: any): void;

This event is raised when there is low memory on the target device.

Parameters ​
ParameterType
event"lowMemory"
callback(args: ApplicationEventData) => void
thisArg?any
Returns ​

void

Call Signature ​

ts
(
   event: "uncaughtError", 
   callback: (args: UnhandledErrorEventData) => void, 
   thisArg?: any): void;

This event is raised when an uncaught error occurs while the application is running.

Parameters ​
ParameterType
event"uncaughtError"
callback(args: UnhandledErrorEventData) => void
thisArg?any
Returns ​

void

Call Signature ​

ts
(
   event: "discardedError", 
   callback: (args: DiscardedErrorEventData) => void, 
   thisArg?: any): void;

This event is raised when an discarded error occurs while the application is running.

Parameters ​
ParameterType
event"discardedError"
callback(args: DiscardedErrorEventData) => void
thisArg?any
Returns ​

void

Call Signature ​

ts
(
   event: "orientationChanged", 
   callback: (args: OrientationChangedEventData) => void, 
   thisArg?: any): void;

This event is raised when the orientation of the application changes.

Parameters ​
ParameterType
event"orientationChanged"
callback(args: OrientationChangedEventData) => void
thisArg?any
Returns ​

void

Call Signature ​

ts
(
   event: "systemAppearanceChanged", 
   callback: (args: SystemAppearanceChangedEventData) => void, 
   thisArg?: any): void;

This event is raised when the operating system appearance changes between light and dark theme (for Android); between light and dark mode (for iOS) and vice versa.

Parameters ​
ParameterType
event"systemAppearanceChanged"
callback(args: SystemAppearanceChangedEventData) => void
thisArg?any
Returns ​

void

Call Signature ​

ts
(
   event: "layoutDirectionChanged", 
   callback: (args: LayoutDirectionChangedEventData) => void, 
   thisArg?: any): void;

This event is raised when the operating system layout direction changes between ltr and rtl.

Parameters ​
ParameterType
event"layoutDirectionChanged"
callback(args: LayoutDirectionChangedEventData) => void
thisArg?any
Returns ​

void

Call Signature ​

ts
(
   event: "fontScaleChanged", 
   callback: (args: FontScaleChangedEventData) => void, 
   thisArg?: any): void;
Parameters ​
ParameterType
event"fontScaleChanged"
callback(args: FontScaleChangedEventData) => void
thisArg?any
Returns ​

void

Call Signature ​

ts
(
   event: "windowOpen", 
   callback: (args: WindowOpenEventData) => void, 
   thisArg?: any): void;
Parameters ​
ParameterType
event"windowOpen"
callback(args: WindowOpenEventData) => void
thisArg?any
Returns ​

void

Call Signature ​

ts
(
   event: "windowClose", 
   callback: (args: WindowCloseEventData) => void, 
   thisArg?: any): void;
Parameters ​
ParameterType
event"windowClose"
callback(args: WindowCloseEventData) => void
thisArg?any
Returns ​

void

Call Signature ​

ts
(
   event: "primaryWindowChanged", 
   callback: (args: PrimaryWindowChangedEventData) => void, 
   thisArg?: any): void;
Parameters ​
ParameterType
event"primaryWindowChanged"
callback(args: PrimaryWindowChangedEventData) => void
thisArg?any
Returns ​

void

Call Signature ​

ts
(
   event: "sceneOpenURLContexts", 
   callback: (args: SceneOpenURLContextsEventData) => void, 
   thisArg?: any): void;
Parameters ​
ParameterType
event"sceneOpenURLContexts"
callback(args: SceneOpenURLContextsEventData) => void
thisArg?any
Returns ​

void

Call Signature ​

ts
(
   event: "sceneContinueUserActivity", 
   callback: (args: SceneContinueUserActivityEventData) => void, 
   thisArg?: any): void;
Parameters ​
ParameterType
event"sceneContinueUserActivity"
callback(args: SceneContinueUserActivityEventData) => void
thisArg?any
Returns ​

void

Call Signature ​

ts
(
   event: "scenePerformActionForShortcutItem", 
   callback: (args: ScenePerformActionForShortcutItemEventData) => void, 
   thisArg?: any): void;
Parameters ​
ParameterType
event"scenePerformActionForShortcutItem"
callback(args: ScenePerformActionForShortcutItemEventData) => void
thisArg?any
Returns ​

void

Inherited from ​

ApplicationCommon.once


orientationChangedEvent ​

ts
readonly orientationChangedEvent: "orientationChanged" = "orientationChanged";

Defined in: application/application-common.ts

Inherited from ​

ApplicationCommon.orientationChangedEvent


primaryWindowChangedEvent ​

ts
readonly primaryWindowChangedEvent: "primaryWindowChanged";

Defined in: application/application-common.ts

Inherited from ​

ApplicationCommon.primaryWindowChangedEvent


readyEvent ​

ts
readonly readyEvent: "ready" = "ready";

Defined in: application/application-common.ts

Raised once per JS context, as soon as the context is initialized. It is never deferred, so it also fires on a background launch where no window is created.

Guaranteed ordering: ready -> windowOpen -> raw connect/create events -> content resolution (the legacy launch bridge runs here, for the first window only) -> contentLoaded -> activate/displayed.

Inherited from ​

ApplicationCommon.readyEvent


resumeEvent ​

ts
readonly resumeEvent: "resume" = "resume";

Defined in: application/application-common.ts

Inherited from ​

ApplicationCommon.resumeEvent


saveActivityStateEvent ​

ts
readonly saveActivityStateEvent: "saveActivityState" = 'saveActivityState';

Defined in: application/application.d.ts:72


started ​

ts
started: boolean;

Defined in: application/application-common.ts

Inherited from ​

ApplicationCommon.started


suspendEvent ​

ts
readonly suspendEvent: "suspend" = "suspend";

Defined in: application/application-common.ts

Reflects whole-app state: with multiple windows it is raised once the app itself is no longer in the foreground, not when an individual window backgrounds. Listen on a NativeWindow for per-window state.

Inherited from ​

ApplicationCommon.suspendEvent


systemAppearanceChangedEvent ​

ts
readonly systemAppearanceChangedEvent: "systemAppearanceChanged" = "systemAppearanceChanged";

Defined in: application/application-common.ts

Inherited from ​

ApplicationCommon.systemAppearanceChangedEvent


uncaughtErrorEvent ​

ts
readonly uncaughtErrorEvent: "uncaughtError" = "uncaughtError";

Defined in: application/application-common.ts

Inherited from ​

ApplicationCommon.uncaughtErrorEvent


windowCloseEvent ​

ts
readonly windowCloseEvent: "windowClose";

Defined in: application/application-common.ts

Inherited from ​

ApplicationCommon.windowCloseEvent


windowOpenEvent ​

ts
readonly windowOpenEvent: "windowOpen";

Defined in: application/application-common.ts

Inherited from ​

ApplicationCommon.windowOpenEvent


activityBackPressedEvent ​

ts
readonly static activityBackPressedEvent: "activityBackPressed" = 'activityBackPressed';

Defined in: application/application.d.ts:62


activityCreatedEvent ​

ts
readonly static activityCreatedEvent: "activityCreated" = 'activityCreated';

Defined in: application/application.d.ts:54


activityDestroyedEvent ​

ts
readonly static activityDestroyedEvent: "activityDestroyed" = 'activityDestroyed';

Defined in: application/application.d.ts:55


activityNewIntentEvent ​

ts
readonly static activityNewIntentEvent: "activityNewIntent" = 'activityNewIntent';

Defined in: application/application.d.ts:63


activityPausedEvent ​

ts
readonly static activityPausedEvent: "activityPaused" = 'activityPaused';

Defined in: application/application.d.ts:57


activityRequestPermissionsEvent ​

ts
readonly static activityRequestPermissionsEvent: "activityRequestPermissions" = 'activityRequestPermissions';

Defined in: application/application.d.ts:64


activityResultEvent ​

ts
readonly static activityResultEvent: "activityResult" = 'activityResult';

Defined in: application/application.d.ts:61


activityResumedEvent ​

ts
readonly static activityResumedEvent: "activityResumed" = 'activityResumed';

Defined in: application/application.d.ts:58


activityStartedEvent ​

ts
readonly static activityStartedEvent: "activityStarted" = 'activityStarted';

Defined in: application/application.d.ts:56


activityStoppedEvent ​

ts
readonly static activityStoppedEvent: "activityStopped" = 'activityStopped';

Defined in: application/application.d.ts:59


hasListeners ​

ts
static hasListeners: (eventName: string) => boolean;

Defined in: application/application-common.ts

Parameters ​

ParameterType
eventNamestring

Returns ​

boolean

Deprecated ​

Use Application.android.hasListeners() instead.

Inherited from ​

ApplicationCommon.hasListeners


notify ​

ts
static notify: <T>(eventData: T) => void;

Defined in: application/application-common.ts

Type Parameters ​

Type ParameterDefault type
TApplicationEventData

Parameters ​

ParameterType
eventDataT

Returns ​

void

Deprecated ​

Use Application.android.notify() instead.

Inherited from ​

ApplicationCommon.notify


off ​

ts
static off: (eventNames: string, callback?: any, thisArg?: any) => void;

Defined in: application/application-common.ts

Parameters ​

ParameterType
eventNamesstring
callback?any
thisArg?any

Returns ​

void

Deprecated ​

Use Application.android.off() instead.

Inherited from ​

ApplicationCommon.off


on ​

ts
static on: {
  (eventNames: string, callback: (args: ApplicationEventData) => void, thisArg?: any): void;
  (event: "cssChanged", callback: (args: CssChangedEventData) => void, thisArg?: any): void;
  (event: "livesync", callback: (args: ApplicationEventData) => void, thisArg?: any): void;
  (event: "launch", callback: (args: LaunchEventData) => void, thisArg?: any): void;
  (event: "ready", callback: (args: ApplicationEventData) => void, thisArg?: any): void;
  (event: "displayed", callback: (args: ApplicationEventData) => void, thisArg?: any): void;
  (event: "suspend", callback: (args: ApplicationEventData) => void, thisArg?: any): void;
  (event: "resume", callback: (args: ApplicationEventData) => void, thisArg?: any): void;
  (event: "exit", callback: (args: ApplicationEventData) => void, thisArg?: any): void;
  (event: "lowMemory", callback: (args: ApplicationEventData) => void, thisArg?: any): void;
  (event: "uncaughtError", callback: (args: UnhandledErrorEventData) => void, thisArg?: any): void;
  (event: "discardedError", callback: (args: DiscardedErrorEventData) => void, thisArg?: any): void;
  (event: "orientationChanged", callback: (args: OrientationChangedEventData) => void, thisArg?: any): void;
  (event: "systemAppearanceChanged", callback: (args: SystemAppearanceChangedEventData) => void, thisArg?: any): void;
  (event: "layoutDirectionChanged", callback: (args: LayoutDirectionChangedEventData) => void, thisArg?: any): void;
  (event: "fontScaleChanged", callback: (args: FontScaleChangedEventData) => void, thisArg?: any): void;
  (event: "windowOpen", callback: (args: WindowOpenEventData) => void, thisArg?: any): void;
  (event: "windowClose", callback: (args: WindowCloseEventData) => void, thisArg?: any): void;
  (event: "primaryWindowChanged", callback: (args: PrimaryWindowChangedEventData) => void, thisArg?: any): void;
  (event: "sceneOpenURLContexts", callback: (args: SceneOpenURLContextsEventData) => void, thisArg?: any): void;
  (event: "sceneContinueUserActivity", callback: (args: SceneContinueUserActivityEventData) => void, thisArg?: any): void;
  (event: "scenePerformActionForShortcutItem", callback: (args: ScenePerformActionForShortcutItemEventData) => void, thisArg?: any): void;
};

Defined in: application/application-common.ts

Call Signature ​

ts
(
   eventNames: string, 
   callback: (args: ApplicationEventData) => void, 
   thisArg?: any): void;
Parameters ​
ParameterType
eventNamesstring
callback(args: ApplicationEventData) => void
thisArg?any
Returns ​

void

Call Signature ​

ts
(
   event: "cssChanged", 
   callback: (args: CssChangedEventData) => void, 
   thisArg?: any): void;

This event is raised when application css is changed.

Parameters ​
ParameterType
event"cssChanged"
callback(args: CssChangedEventData) => void
thisArg?any
Returns ​

void

Call Signature ​

ts
(
   event: "livesync", 
   callback: (args: ApplicationEventData) => void, 
   thisArg?: any): void;

Event raised then livesync operation is performed.

Parameters ​
ParameterType
event"livesync"
callback(args: ApplicationEventData) => void
thisArg?any
Returns ​

void

Call Signature ​

ts
(
   event: "launch", 
   callback: (args: LaunchEventData) => void, 
   thisArg?: any): void;

This event is raised on application launchEvent.

Parameters ​
ParameterType
event"launch"
callback(args: LaunchEventData) => void
thisArg?any
Returns ​

void

Call Signature ​

ts
(
   event: "ready", 
   callback: (args: ApplicationEventData) => void, 
   thisArg?: any): void;

This event is raised once the JS context is initialized.

Parameters ​
ParameterType
event"ready"
callback(args: ApplicationEventData) => void
thisArg?any
Returns ​

void

Call Signature ​

ts
(
   event: "displayed", 
   callback: (args: ApplicationEventData) => void, 
   thisArg?: any): void;

Experimental

This event is raised after the application has performed most of its startup actions. Its intent is to be suitable for measuring app startup times.

Parameters ​
ParameterType
event"displayed"
callback(args: ApplicationEventData) => void
thisArg?any
Returns ​

void

Call Signature ​

ts
(
   event: "suspend", 
   callback: (args: ApplicationEventData) => void, 
   thisArg?: any): void;

This event is raised when the Application is suspended.

Parameters ​
ParameterType
event"suspend"
callback(args: ApplicationEventData) => void
thisArg?any
Returns ​

void

Call Signature ​

ts
(
   event: "resume", 
   callback: (args: ApplicationEventData) => void, 
   thisArg?: any): void;

This event is raised when the Application is resumed after it has been suspended.

Parameters ​
ParameterType
event"resume"
callback(args: ApplicationEventData) => void
thisArg?any
Returns ​

void

Call Signature ​

ts
(
   event: "exit", 
   callback: (args: ApplicationEventData) => void, 
   thisArg?: any): void;

This event is raised when the Application is about to exit.

On Android it is raised when the last window closes; the process may stay alive. On iOS it is raised when the process itself terminates.

Parameters ​
ParameterType
event"exit"
callback(args: ApplicationEventData) => void
thisArg?any
Returns ​

void

Call Signature ​

ts
(
   event: "lowMemory", 
   callback: (args: ApplicationEventData) => void, 
   thisArg?: any): void;

This event is raised when there is low memory on the target device.

Parameters ​
ParameterType
event"lowMemory"
callback(args: ApplicationEventData) => void
thisArg?any
Returns ​

void

Call Signature ​

ts
(
   event: "uncaughtError", 
   callback: (args: UnhandledErrorEventData) => void, 
   thisArg?: any): void;

This event is raised when an uncaught error occurs while the application is running.

Parameters ​
ParameterType
event"uncaughtError"
callback(args: UnhandledErrorEventData) => void
thisArg?any
Returns ​

void

Call Signature ​

ts
(
   event: "discardedError", 
   callback: (args: DiscardedErrorEventData) => void, 
   thisArg?: any): void;

This event is raised when an discarded error occurs while the application is running.

Parameters ​
ParameterType
event"discardedError"
callback(args: DiscardedErrorEventData) => void
thisArg?any
Returns ​

void

Call Signature ​

ts
(
   event: "orientationChanged", 
   callback: (args: OrientationChangedEventData) => void, 
   thisArg?: any): void;

This event is raised when the orientation of the application changes.

Parameters ​
ParameterType
event"orientationChanged"
callback(args: OrientationChangedEventData) => void
thisArg?any
Returns ​

void

Call Signature ​

ts
(
   event: "systemAppearanceChanged", 
   callback: (args: SystemAppearanceChangedEventData) => void, 
   thisArg?: any): void;

This event is raised when the operating system appearance changes between light and dark theme (for Android); between light and dark mode (for iOS) and vice versa.

Parameters ​
ParameterType
event"systemAppearanceChanged"
callback(args: SystemAppearanceChangedEventData) => void
thisArg?any
Returns ​

void

Call Signature ​

ts
(
   event: "layoutDirectionChanged", 
   callback: (args: LayoutDirectionChangedEventData) => void, 
   thisArg?: any): void;

This event is raised when the operating system layout direction changes between ltr and rtl.

Parameters ​
ParameterType
event"layoutDirectionChanged"
callback(args: LayoutDirectionChangedEventData) => void
thisArg?any
Returns ​

void

Call Signature ​

ts
(
   event: "fontScaleChanged", 
   callback: (args: FontScaleChangedEventData) => void, 
   thisArg?: any): void;
Parameters ​
ParameterType
event"fontScaleChanged"
callback(args: FontScaleChangedEventData) => void
thisArg?any
Returns ​

void

Call Signature ​

ts
(
   event: "windowOpen", 
   callback: (args: WindowOpenEventData) => void, 
   thisArg?: any): void;
Parameters ​
ParameterType
event"windowOpen"
callback(args: WindowOpenEventData) => void
thisArg?any
Returns ​

void

Call Signature ​

ts
(
   event: "windowClose", 
   callback: (args: WindowCloseEventData) => void, 
   thisArg?: any): void;
Parameters ​
ParameterType
event"windowClose"
callback(args: WindowCloseEventData) => void
thisArg?any
Returns ​

void

Call Signature ​

ts
(
   event: "primaryWindowChanged", 
   callback: (args: PrimaryWindowChangedEventData) => void, 
   thisArg?: any): void;
Parameters ​
ParameterType
event"primaryWindowChanged"
callback(args: PrimaryWindowChangedEventData) => void
thisArg?any
Returns ​

void

Call Signature ​

ts
(
   event: "sceneOpenURLContexts", 
   callback: (args: SceneOpenURLContextsEventData) => void, 
   thisArg?: any): void;
Parameters ​
ParameterType
event"sceneOpenURLContexts"
callback(args: SceneOpenURLContextsEventData) => void
thisArg?any
Returns ​

void

Call Signature ​

ts
(
   event: "sceneContinueUserActivity", 
   callback: (args: SceneContinueUserActivityEventData) => void, 
   thisArg?: any): void;
Parameters ​
ParameterType
event"sceneContinueUserActivity"
callback(args: SceneContinueUserActivityEventData) => void
thisArg?any
Returns ​

void

Call Signature ​

ts
(
   event: "scenePerformActionForShortcutItem", 
   callback: (args: ScenePerformActionForShortcutItemEventData) => void, 
   thisArg?: any): void;
Parameters ​
ParameterType
event"scenePerformActionForShortcutItem"
callback(args: ScenePerformActionForShortcutItemEventData) => void
thisArg?any
Returns ​

void

Deprecated ​

Use Application.android.on() instead.

Inherited from ​

ApplicationCommon.on


once ​

ts
static once: {
  (eventNames: string, callback: (args: ApplicationEventData) => void, thisArg?: any): void;
  (event: "cssChanged", callback: (args: CssChangedEventData) => void, thisArg?: any): void;
  (event: "livesync", callback: (args: ApplicationEventData) => void, thisArg?: any): void;
  (event: "launch", callback: (args: LaunchEventData) => void, thisArg?: any): void;
  (event: "ready", callback: (args: ApplicationEventData) => void, thisArg?: any): void;
  (event: "displayed", callback: (args: ApplicationEventData) => void, thisArg?: any): void;
  (event: "suspend", callback: (args: ApplicationEventData) => void, thisArg?: any): void;
  (event: "resume", callback: (args: ApplicationEventData) => void, thisArg?: any): void;
  (event: "exit", callback: (args: ApplicationEventData) => void, thisArg?: any): void;
  (event: "lowMemory", callback: (args: ApplicationEventData) => void, thisArg?: any): void;
  (event: "uncaughtError", callback: (args: UnhandledErrorEventData) => void, thisArg?: any): void;
  (event: "discardedError", callback: (args: DiscardedErrorEventData) => void, thisArg?: any): void;
  (event: "orientationChanged", callback: (args: OrientationChangedEventData) => void, thisArg?: any): void;
  (event: "systemAppearanceChanged", callback: (args: SystemAppearanceChangedEventData) => void, thisArg?: any): void;
  (event: "layoutDirectionChanged", callback: (args: LayoutDirectionChangedEventData) => void, thisArg?: any): void;
  (event: "fontScaleChanged", callback: (args: FontScaleChangedEventData) => void, thisArg?: any): void;
  (event: "windowOpen", callback: (args: WindowOpenEventData) => void, thisArg?: any): void;
  (event: "windowClose", callback: (args: WindowCloseEventData) => void, thisArg?: any): void;
  (event: "primaryWindowChanged", callback: (args: PrimaryWindowChangedEventData) => void, thisArg?: any): void;
  (event: "sceneOpenURLContexts", callback: (args: SceneOpenURLContextsEventData) => void, thisArg?: any): void;
  (event: "sceneContinueUserActivity", callback: (args: SceneContinueUserActivityEventData) => void, thisArg?: any): void;
  (event: "scenePerformActionForShortcutItem", callback: (args: ScenePerformActionForShortcutItemEventData) => void, thisArg?: any): void;
};

Defined in: application/application-common.ts

Call Signature ​

ts
(
   eventNames: string, 
   callback: (args: ApplicationEventData) => void, 
   thisArg?: any): void;
Parameters ​
ParameterType
eventNamesstring
callback(args: ApplicationEventData) => void
thisArg?any
Returns ​

void

Call Signature ​

ts
(
   event: "cssChanged", 
   callback: (args: CssChangedEventData) => void, 
   thisArg?: any): void;

This event is raised when application css is changed.

Parameters ​
ParameterType
event"cssChanged"
callback(args: CssChangedEventData) => void
thisArg?any
Returns ​

void

Call Signature ​

ts
(
   event: "livesync", 
   callback: (args: ApplicationEventData) => void, 
   thisArg?: any): void;

Event raised then livesync operation is performed.

Parameters ​
ParameterType
event"livesync"
callback(args: ApplicationEventData) => void
thisArg?any
Returns ​

void

Call Signature ​

ts
(
   event: "launch", 
   callback: (args: LaunchEventData) => void, 
   thisArg?: any): void;

This event is raised on application launchEvent.

Parameters ​
ParameterType
event"launch"
callback(args: LaunchEventData) => void
thisArg?any
Returns ​

void

Call Signature ​

ts
(
   event: "ready", 
   callback: (args: ApplicationEventData) => void, 
   thisArg?: any): void;

This event is raised once the JS context is initialized.

Parameters ​
ParameterType
event"ready"
callback(args: ApplicationEventData) => void
thisArg?any
Returns ​

void

Call Signature ​

ts
(
   event: "displayed", 
   callback: (args: ApplicationEventData) => void, 
   thisArg?: any): void;

Experimental

This event is raised after the application has performed most of its startup actions. Its intent is to be suitable for measuring app startup times.

Parameters ​
ParameterType
event"displayed"
callback(args: ApplicationEventData) => void
thisArg?any
Returns ​

void

Call Signature ​

ts
(
   event: "suspend", 
   callback: (args: ApplicationEventData) => void, 
   thisArg?: any): void;

This event is raised when the Application is suspended.

Parameters ​
ParameterType
event"suspend"
callback(args: ApplicationEventData) => void
thisArg?any
Returns ​

void

Call Signature ​

ts
(
   event: "resume", 
   callback: (args: ApplicationEventData) => void, 
   thisArg?: any): void;

This event is raised when the Application is resumed after it has been suspended.

Parameters ​
ParameterType
event"resume"
callback(args: ApplicationEventData) => void
thisArg?any
Returns ​

void

Call Signature ​

ts
(
   event: "exit", 
   callback: (args: ApplicationEventData) => void, 
   thisArg?: any): void;

This event is raised when the Application is about to exit.

On Android it is raised when the last window closes; the process may stay alive. On iOS it is raised when the process itself terminates.

Parameters ​
ParameterType
event"exit"
callback(args: ApplicationEventData) => void
thisArg?any
Returns ​

void

Call Signature ​

ts
(
   event: "lowMemory", 
   callback: (args: ApplicationEventData) => void, 
   thisArg?: any): void;

This event is raised when there is low memory on the target device.

Parameters ​
ParameterType
event"lowMemory"
callback(args: ApplicationEventData) => void
thisArg?any
Returns ​

void

Call Signature ​

ts
(
   event: "uncaughtError", 
   callback: (args: UnhandledErrorEventData) => void, 
   thisArg?: any): void;

This event is raised when an uncaught error occurs while the application is running.

Parameters ​
ParameterType
event"uncaughtError"
callback(args: UnhandledErrorEventData) => void
thisArg?any
Returns ​

void

Call Signature ​

ts
(
   event: "discardedError", 
   callback: (args: DiscardedErrorEventData) => void, 
   thisArg?: any): void;

This event is raised when an discarded error occurs while the application is running.

Parameters ​
ParameterType
event"discardedError"
callback(args: DiscardedErrorEventData) => void
thisArg?any
Returns ​

void

Call Signature ​

ts
(
   event: "orientationChanged", 
   callback: (args: OrientationChangedEventData) => void, 
   thisArg?: any): void;

This event is raised when the orientation of the application changes.

Parameters ​
ParameterType
event"orientationChanged"
callback(args: OrientationChangedEventData) => void
thisArg?any
Returns ​

void

Call Signature ​

ts
(
   event: "systemAppearanceChanged", 
   callback: (args: SystemAppearanceChangedEventData) => void, 
   thisArg?: any): void;

This event is raised when the operating system appearance changes between light and dark theme (for Android); between light and dark mode (for iOS) and vice versa.

Parameters ​
ParameterType
event"systemAppearanceChanged"
callback(args: SystemAppearanceChangedEventData) => void
thisArg?any
Returns ​

void

Call Signature ​

ts
(
   event: "layoutDirectionChanged", 
   callback: (args: LayoutDirectionChangedEventData) => void, 
   thisArg?: any): void;

This event is raised when the operating system layout direction changes between ltr and rtl.

Parameters ​
ParameterType
event"layoutDirectionChanged"
callback(args: LayoutDirectionChangedEventData) => void
thisArg?any
Returns ​

void

Call Signature ​

ts
(
   event: "fontScaleChanged", 
   callback: (args: FontScaleChangedEventData) => void, 
   thisArg?: any): void;
Parameters ​
ParameterType
event"fontScaleChanged"
callback(args: FontScaleChangedEventData) => void
thisArg?any
Returns ​

void

Call Signature ​

ts
(
   event: "windowOpen", 
   callback: (args: WindowOpenEventData) => void, 
   thisArg?: any): void;
Parameters ​
ParameterType
event"windowOpen"
callback(args: WindowOpenEventData) => void
thisArg?any
Returns ​

void

Call Signature ​

ts
(
   event: "windowClose", 
   callback: (args: WindowCloseEventData) => void, 
   thisArg?: any): void;
Parameters ​
ParameterType
event"windowClose"
callback(args: WindowCloseEventData) => void
thisArg?any
Returns ​

void

Call Signature ​

ts
(
   event: "primaryWindowChanged", 
   callback: (args: PrimaryWindowChangedEventData) => void, 
   thisArg?: any): void;
Parameters ​
ParameterType
event"primaryWindowChanged"
callback(args: PrimaryWindowChangedEventData) => void
thisArg?any
Returns ​

void

Call Signature ​

ts
(
   event: "sceneOpenURLContexts", 
   callback: (args: SceneOpenURLContextsEventData) => void, 
   thisArg?: any): void;
Parameters ​
ParameterType
event"sceneOpenURLContexts"
callback(args: SceneOpenURLContextsEventData) => void
thisArg?any
Returns ​

void

Call Signature ​

ts
(
   event: "sceneContinueUserActivity", 
   callback: (args: SceneContinueUserActivityEventData) => void, 
   thisArg?: any): void;
Parameters ​
ParameterType
event"sceneContinueUserActivity"
callback(args: SceneContinueUserActivityEventData) => void
thisArg?any
Returns ​

void

Call Signature ​

ts
(
   event: "scenePerformActionForShortcutItem", 
   callback: (args: ScenePerformActionForShortcutItemEventData) => void, 
   thisArg?: any): void;
Parameters ​
ParameterType
event"scenePerformActionForShortcutItem"
callback(args: ScenePerformActionForShortcutItemEventData) => void
thisArg?any
Returns ​

void

Deprecated ​

Use Application.android.once() instead.

Inherited from ​

ApplicationCommon.once


saveActivityStateEvent ​

ts
readonly static saveActivityStateEvent: "saveActivityState" = 'saveActivityState';

Defined in: application/application.d.ts:60

Accessors ​

activeWindow ​

Get Signature ​

ts
get activeWindow(): NativeWindow;

Defined in: application/application-common.ts

Get the NativeWindow the user is currently interacting with - the one that activated most recently and is still attached. Falls back to the primary window while no window holds activation, which is the case before the first window activates and on a platform that never raises activate.

Returns ​

NativeWindow

Inherited from ​

ApplicationCommon.activeWindow


android ​

Get Signature ​

ts
get android(): AndroidApplication;

Defined in: application/application-common.ts

Returns ​

AndroidApplication

Inherited from ​

ApplicationCommon.android


AndroidApplication ​

Get Signature ​

ts
get AndroidApplication(): AndroidApplication;

Defined in: application/application-common.ts

Returns ​

AndroidApplication

Inherited from ​

ApplicationCommon.AndroidApplication


autoSystemAppearanceChanged ​

Get Signature ​

ts
get autoSystemAppearanceChanged(): boolean;

Defined in: application/application-common.ts

Boolean to enable/disable systemAppearanceChanged

Returns ​

boolean

Set Signature ​

ts
set autoSystemAppearanceChanged(value: boolean): void;

Defined in: application/application-common.ts

Parameters ​
ParameterType
valueboolean
Returns ​

void

Inherited from ​

ApplicationCommon.autoSystemAppearanceChanged


backgrounded ​

Get Signature ​

ts
get backgrounded(): boolean;

Defined in: application/application.d.ts:117

Deprecated ​

Use Application.inBackground instead.

Returns ​

boolean


context ​

Get Signature ​

ts
get context(): Context;

Defined in: application/application.d.ts:112

Deprecated ​

Use Utils.android.getApplicationContext() instead.

Returns ​

Context


foregroundActivity ​

Get Signature ​

ts
get foregroundActivity(): AppCompatActivity;

Defined in: application/application.d.ts:107

The currently active (loaded) android Activity.

This property is automatically updated upon Activity events.

Returns ​

AppCompatActivity


inBackground ​

Get Signature ​

ts
get inBackground(): boolean;

Defined in: application/application-common.ts

Returns ​

boolean

Inherited from ​

ApplicationCommon.inBackground


ios ​

Get Signature ​

ts
get ios(): iOSApplication;

Defined in: application/application-common.ts

Returns ​

iOSApplication

Inherited from ​

ApplicationCommon.ios


iOSApplication ​

Get Signature ​

ts
get iOSApplication(): iOSApplication;

Defined in: application/application-common.ts

Returns ​

iOSApplication

Inherited from ​

ApplicationCommon.iOSApplication


nativeApp ​

Get Signature ​

ts
get nativeApp(): Application;

Defined in: application/application.d.ts:90

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

Returns ​

Application


packageName ​

Get Signature ​

ts
get packageName(): string;

Defined in: application/application.d.ts:95

Deprecated ​

Use Utils.android.getPackageName() instead.

Returns ​

string


paused ​

Get Signature ​

ts
get paused(): boolean;

Defined in: application/application.d.ts:122

Deprecated ​

Use Application.suspended instead.

Returns ​

boolean


primaryWindow ​

Get Signature ​

ts
get primaryWindow(): NativeWindow;

Defined in: application/application-common.ts

Get the primary NativeWindow.

Returns ​

NativeWindow

Inherited from ​

ApplicationCommon.primaryWindow


startActivity ​

Get Signature ​

ts
get startActivity(): AppCompatActivity;

Defined in: application/application.d.ts:100

The main (start) Activity for the application.

Returns ​

AppCompatActivity


suspended ​

Get Signature ​

ts
get suspended(): boolean;

Defined in: application/application-common.ts

Returns ​

boolean

Inherited from ​

ApplicationCommon.suspended

Methods ​

_onPrimaryWindowPromoted() ​

ts
protected _onPrimaryWindowPromoted(nativeWindow: NativeWindow): void;

Defined in: application/application-common.ts

Hook for platform-specific bookkeeping right after a window takes over the primary role, before primaryWindowChanged is raised.

Parameters ​

ParameterType
nativeWindowNativeWindow

Returns ​

void

Inherited from ​

ApplicationCommon._onPrimaryWindowPromoted


_onWindowRegistered() ​

ts
protected _onWindowRegistered(nativeWindow: NativeWindow): void;

Defined in: application/application-common.ts

Hook for platform-specific bookkeeping right after a window joins the registry, before windowOpen is raised.

Parameters ​

ParameterType
nativeWindowNativeWindow

Returns ​

void

Inherited from ​

ApplicationCommon._onWindowRegistered


addCss() ​

ts
addCss(cssText: string, attributeScoped?: boolean): void;

Defined in: application/application-common.ts

Parameters ​

ParameterType
cssTextstring
attributeScoped?boolean

Returns ​

void

Inherited from ​

ApplicationCommon.addCss


applyCssClass() ​

ts
applyCssClass(
   rootView: View, 
   cssClasses: string[], 
   newCssClass: string, 
   skipCssUpdate?: boolean): void;

Defined in: application/application-common.ts

Applies the the newCssClass to the rootView and removes all other css classes from cssClasses previously applied to the rootView.

Parameters ​

ParameterTypeDescription
rootViewView-
cssClassesstring[]-
newCssClassstring-
skipCssUpdate?boolean-

Returns ​

void

Inherited from ​

ApplicationCommon.applyCssClass


createRootView() ​

ts
createRootView(
   view?: View, 
   fireLaunchEvent?: boolean, 
   additionalLanchEventData?: any): View;

Defined in: application/application-common.ts

Parameters ​

ParameterType
view?View
fireLaunchEvent?boolean
additionalLanchEventData?any

Returns ​

View

Inherited from ​

ApplicationCommon.createRootView


getCssFileName() ​

ts
getCssFileName(): string;

Defined in: application/application-common.ts

Gets css file name for the application.

Returns ​

string

Inherited from ​

ApplicationCommon.getCssFileName


getLayoutDirection() ​

ts
protected getLayoutDirection(): LayoutDirectionType;

Defined in: application/application-common.ts

Returns ​

LayoutDirectionType

Inherited from ​

ApplicationCommon.getLayoutDirection


getMainEntry() ​

ts
getMainEntry(): any;

Defined in: application/application-common.ts

Returns ​

any

The main entry of the application

Inherited from ​

ApplicationCommon.getMainEntry


getNativeApplication() ​

ts
getNativeApplication(): Application;

Defined in: application/application.d.ts:80

Returns ​

Application

Overrides ​

ApplicationCommon.getNativeApplication


getOrientation() ​

ts
protected getOrientation(): "portrait" | "landscape" | "unknown";

Defined in: application/application-common.ts

Returns ​

"portrait" | "landscape" | "unknown"

Inherited from ​

ApplicationCommon.getOrientation


getRegisteredBroadcastReceiver() ​

ts
getRegisteredBroadcastReceiver(intentFilter: string): any;

Defined in: application/application.d.ts:146

Get a registered BroadcastReceiver, then you can get the result code of BroadcastReceiver in onReceiveCallback method.

Parameters ​

ParameterTypeDescription
intentFilterstringA string containing the intent filter.

Returns ​

any

Deprecated ​

Use getRegisteredBroadcastReceivers instead.


getRegisteredBroadcastReceivers() ​

ts
getRegisteredBroadcastReceivers(intentFilter: string): BroadcastReceiver[];

Defined in: application/application.d.ts:151

Get all registered BroadcastReceivers for a specific intent filter.

Parameters ​

ParameterTypeDescription
intentFilterstringa string containing the intent filter

Returns ​

BroadcastReceiver[]


getResources() ​

ts
getResources(): any;

Defined in: application/application-common.ts

Get application level static resources.

Returns ​

any

Inherited from ​

ApplicationCommon.getResources


getRootView() ​

ts
getRootView(): View;

Defined in: application/application-common.ts

Returns ​

View

Inherited from ​

ApplicationCommon.getRootView


getSystemAppearance() ​

ts
protected getSystemAppearance(): "dark" | "light";

Defined in: application/application-common.ts

Returns ​

"dark" | "light"

Inherited from ​

ApplicationCommon.getSystemAppearance


getWindowById() ​

ts
getWindowById(id: string): NativeWindow;

Defined in: application/application-common.ts

Get a registered NativeWindow by its id.

Parameters ​

ParameterType
idstring

Returns ​

NativeWindow

Inherited from ​

ApplicationCommon.getWindowById


getWindowContentResolver() ​

ts
getWindowContentResolver(): WindowContentResolver;

Defined in: application/application-common.ts

Returns ​

WindowContentResolver

The callback currently supplying window content, if any.

Inherited from ​

ApplicationCommon.getWindowContentResolver


getWindows() ​

Call Signature ​

ts
getWindows(role: "all"): WindowBase[];

Defined in: application/application-common.ts

Get the active windows, filtered by role.

Defaults to the view-carrying app windows (application and embedded). Pass 'all' to include every registered surface, including ones that carry no view tree.

Parameters ​
ParameterType
role"all"
Returns ​

WindowBase[]

Inherited from ​

ApplicationCommon.getWindows

Call Signature ​

ts
getWindows(role?: 
  | WindowRole
  | WindowRole[]): NativeWindow[];

Defined in: application/application-common.ts

Get the active windows, filtered by role.

Defaults to the view-carrying app windows (application and embedded). Pass 'all' to include every registered surface, including ones that carry no view tree.

Parameters ​
ParameterType
role?| WindowRole | WindowRole[]
Returns ​

NativeWindow[]

Inherited from ​

ApplicationCommon.getWindows

Call Signature ​

ts
getWindows(role?: 
  | "all"
  | WindowRole
  | WindowRole[]): WindowBase[];

Defined in: application/application-common.ts

Get the active windows, filtered by role.

Defaults to the view-carrying app windows (application and embedded). Pass 'all' to include every registered surface, including ones that carry no view tree.

Parameters ​
ParameterType
role?| "all" | WindowRole | WindowRole[]
Returns ​

WindowBase[]

Inherited from ​

ApplicationCommon.getWindows


hasLaunched() ​

ts
hasLaunched(): boolean;

Defined in: application/application-common.ts

Returns ​

boolean

Inherited from ​

ApplicationCommon.hasLaunched


initRootView() ​

ts
initRootView(rootView: View, window?: NativeWindow): void;

Defined in: application/application-common.ts

Parameters ​

ParameterTypeDescription
rootViewView-
window?NativeWindowthe window the root view belongs to. Supplies the window-scoped CSS classes; without it they come from the primary window.

Returns ​

void

Inherited from ​

ApplicationCommon.initRootView


layoutDirection() ​

ts
layoutDirection(): LayoutDirectionType;

Defined in: application/application-common.ts

Returns ​

LayoutDirectionType

Deprecated ​

Use Application.primaryWindow?.layoutDirection() - or the NativeWindow of the relevant view - instead. Continues to reflect the primary window.

Inherited from ​

ApplicationCommon.layoutDirection


layoutDirectionChanged() ​

ts
layoutDirectionChanged(rootView: View, newLayoutDirection: LayoutDirectionType): void;

Defined in: application/application-common.ts

Updates root view classes including those of modals

Parameters ​

ParameterTypeDescription
rootViewViewthe root view
newLayoutDirectionLayoutDirectionTypethe new layout direction change

Returns ​

void

Inherited from ​

ApplicationCommon.layoutDirectionChanged


loadAppCss() ​

ts
loadAppCss(): void;

Defined in: application/application-common.ts

Loads immediately the app.css. By default the app.css file is loaded shortly after "loaded". For the Android snapshot the CSS can be parsed during the snapshot generation, as the CSS does not depend on runtime APIs, and loadAppCss will be called explicitly.

Returns ​

void

Inherited from ​

ApplicationCommon.loadAppCss


notifyLaunch() ​

ts
protected notifyLaunch(additionalLanchEventData?: any): View;

Defined in: application/application-common.ts

Parameters ​

ParameterType
additionalLanchEventData?any

Returns ​

View

Inherited from ​

ApplicationCommon.notifyLaunch


openWindow() ​

ts
openWindow(options?: WindowOpenOptions): void;

Defined in: application/application.d.ts:172

Experimental

Opens a new window by launching the start activity into its own task.

Parameters ​

ParameterTypeDescription
options?WindowOpenOptionsOptions for the new window. options.data is put on the launch intent as extras and surfaces as the window's data. The start activity's launchMode in AndroidManifest.xml decides whether a second instance can exist at all: singleTask (the app template default) and singleInstance route the intent to the existing activity's onNewIntent instead of creating one. Use singleInstancePerTask (API 31+) to keep single-task behavior for launcher and deep-link starts while allowing additional windows, or standard. When the app is already in split-screen, the new window opens in the adjacent pane; otherwise it covers the current one and both show in recents.

Returns ​

void

Overrides ​

ApplicationCommon.openWindow


orientation() ​

ts
orientation(): "portrait" | "landscape" | "unknown";

Defined in: application/application-common.ts

Returns ​

"portrait" | "landscape" | "unknown"

Deprecated ​

Use Application.primaryWindow?.orientation() - or the NativeWindow of the relevant view - instead. Continues to reflect the primary window.

Inherited from ​

ApplicationCommon.orientation


orientationChanged() ​

ts
orientationChanged(rootView: View, newOrientation: "portrait" | "landscape" | "unknown"): void;

Defined in: application/application-common.ts

Parameters ​

ParameterType
rootViewView
newOrientation"portrait" | "landscape" | "unknown"

Returns ​

void

Inherited from ​

ApplicationCommon.orientationChanged


registerBroadcastReceiver() ​

ts
registerBroadcastReceiver(
   intentFilter: string, 
   onReceiveCallback: (context: Context, intent: Intent) => void, 
   flags?: number): () => void;

Defined in: application/application.d.ts:132

Register 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(android.content.BroadcastReceiver, android.content.IntentFilter)'

Parameters ​

ParameterTypeDescription
intentFilterstringA string containing the intent filter.
onReceiveCallback(context: Context, intent: Intent) => voidA callback function that will be called each time the receiver receives a broadcast.
flags?numberAny combination of RECEIVER_VISIBLE_TO_INSTANT_APPS (1), RECEIVER_EXPORTED (2) and RECEIVER_NOT_EXPORTED (4). Defaults to RECEIVER_EXPORTED. Only honored from API 26 onwards.

Returns ​

A function that can be called to unregister the receiver.

() => void


resetRootView() ​

ts
resetRootView(entry?: string | NavigationEntry): void;

Defined in: application/application-common.ts

Parameters ​

ParameterType
entry?string | NavigationEntry

Returns ​

void

Inherited from ​

ApplicationCommon.resetRootView


run() ​

ts
run(entry?: string | NavigationEntry): void;

Defined in: application/application-common.ts

Parameters ​

ParameterType
entry?string | NavigationEntry

Returns ​

void

Inherited from ​

ApplicationCommon.run


setAutoSystemAppearanceChanged() ​

ts
setAutoSystemAppearanceChanged(value: boolean): void;

Defined in: application/application-common.ts

enable/disable systemAppearanceChanged

Parameters ​

ParameterType
valueboolean

Returns ​

void

Inherited from ​

ApplicationCommon.setAutoSystemAppearanceChanged


setCssFileName() ​

ts
setCssFileName(cssFileName: string): void;

Defined in: application/application-common.ts

Sets css file name for the application.

Parameters ​

ParameterType
cssFileNamestring

Returns ​

void

Inherited from ​

ApplicationCommon.setCssFileName


setInBackground() ​

ts
setInBackground(value: boolean, additonalData?: any): void;

Defined in: application/application-common.ts

Parameters ​

ParameterType
valueboolean
additonalData?any

Returns ​

void

Inherited from ​

ApplicationCommon.setInBackground


setLayoutDirection() ​

ts
protected setLayoutDirection(value: LayoutDirectionType): void;

Defined in: application/application-common.ts

Parameters ​

ParameterType
valueLayoutDirectionType

Returns ​

void

Inherited from ​

ApplicationCommon.setLayoutDirection


setMaxRefreshRate() ​

ts
setMaxRefreshRate(options?: {
  max?: number;
  min?: number;
  preferred?: number;
}): void;

Defined in: application/application-common.ts

iOS Only Dynamically change the preferred frame rate For devices (iOS 15+) which support min/max/preferred frame rate you can specify ranges For devices (iOS < 15), you can specify the max frame rate see: https://developer.apple.com/documentation/quartzcore/optimizing_promotion_refresh_rates_for_iphone_13_pro_and_ipad_pro To use, ensure your Info.plist has:

xml
  <key>CADisableMinimumFrameDurationOnPhone</key>
  <true/>

Parameters ​

ParameterTypeDescription
options?{ max?: number; min?: number; preferred?: number; }{ min?: number; max?: number; preferred?: number }
options.max?number-
options.min?number-
options.preferred?number-

Returns ​

void

Inherited from ​

ApplicationCommon.setMaxRefreshRate


setOrientation() ​

ts
protected setOrientation(value: "portrait" | "landscape" | "unknown"): void;

Defined in: application/application-common.ts

Parameters ​

ParameterType
value"portrait" | "landscape" | "unknown"

Returns ​

void

Inherited from ​

ApplicationCommon.setOrientation


setResources() ​

ts
setResources(res: any): void;

Defined in: application/application-common.ts

Set application level static resources.

Parameters ​

ParameterType
resany

Returns ​

void

Inherited from ​

ApplicationCommon.setResources


setSuspended() ​

ts
setSuspended(value: boolean, additonalData?: any): void;

Defined in: application/application-common.ts

Parameters ​

ParameterType
valueboolean
additonalData?any

Returns ​

void

Inherited from ​

ApplicationCommon.setSuspended


setSystemAppearance() ​

ts
protected setSystemAppearance(value: "dark" | "light"): void;

Defined in: application/application-common.ts

Parameters ​

ParameterType
value"dark" | "light"

Returns ​

void

Inherited from ​

ApplicationCommon.setSystemAppearance


setWindowContentResolver() ​

ts
setWindowContentResolver(resolver: WindowContentResolver): void;

Defined in: application/application-common.ts

Sets the callback that supplies the UI for windows that need content. Pass null to remove a previously set resolver.

Parameters ​

ParameterType
resolverWindowContentResolver

Returns ​

void

Inherited from ​

ApplicationCommon.setWindowContentResolver


systemAppearance() ​

ts
systemAppearance(): "dark" | "light";

Defined in: application/application-common.ts

Returns ​

"dark" | "light"

Deprecated ​

Use Application.primaryWindow?.systemAppearance() - or the NativeWindow of the relevant view - instead. Continues to reflect the primary window.

Inherited from ​

ApplicationCommon.systemAppearance


systemAppearanceChanged() ​

ts
systemAppearanceChanged(rootView: View, newSystemAppearance: "dark" | "light"): void;

Defined in: application/application-common.ts

Updates root view classes including those of modals

Parameters ​

ParameterTypeDescription
rootViewViewthe root view
newSystemAppearance"dark" | "light"the new appearance change

Returns ​

void

Inherited from ​

ApplicationCommon.systemAppearanceChanged


unregisterBroadcastReceiver() ​

ts
unregisterBroadcastReceiver(intentFilter: string): void;

Defined in: application/application.d.ts:139

Unregister a previously registered BroadcastReceiver. For more information, please visit 'http://developer.android.com/reference/android/content/Context.html#unregisterReceiver(android.content.BroadcastReceiver)'

Parameters ​

ParameterTypeDescription
intentFilterstringA string containing the intent filter with which the receiver was originally registered.

Returns ​

void