@akylas/nativescript 9.0.25 → 9.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/abortcontroller/abortsignal.js.map +1 -1
- package/abortcontroller/index.js.map +1 -1
- package/accessibility/accessibility-common.js.map +1 -1
- package/accessibility/accessibility-css-helper.js.map +1 -1
- package/accessibility/accessibility-properties.js.map +1 -1
- package/accessibility/accessibility-service-common.js.map +1 -1
- package/accessibility/accessibility-service.android.js.map +1 -1
- package/accessibility/accessibility-service.ios.js.map +1 -1
- package/accessibility/accessibility-types.js.map +1 -1
- package/accessibility/font-scale-common.js.map +1 -1
- package/accessibility/font-scale.android.js.map +1 -1
- package/accessibility/font-scale.ios.js.map +1 -1
- package/accessibility/index.android.js.map +1 -1
- package/accessibility/index.ios.js.map +1 -1
- package/animation-frame/animation-native.android.js.map +1 -1
- package/animation-frame/animation-native.ios.js.map +1 -1
- package/animation-frame/index.js.map +1 -1
- package/application/application-common.d.ts +199 -3
- package/application/application-common.js +425 -55
- package/application/application-common.js.map +1 -1
- package/application/application-interfaces.d.ts +67 -1
- package/application/application-interfaces.js.map +1 -1
- package/application/application-shims.js.map +1 -1
- package/application/application.android.d.ts +39 -0
- package/application/application.android.js +242 -17
- package/application/application.android.js.map +1 -1
- package/application/application.d.ts +161 -54
- package/application/application.ios.d.ts +189 -28
- package/application/application.ios.js +885 -379
- package/application/application.ios.js.map +1 -1
- package/application/helpers-common.d.ts +5 -0
- package/application/helpers-common.js +23 -1
- package/application/helpers-common.js.map +1 -1
- package/application/helpers.android.js.map +1 -1
- package/application/helpers.ios.js.map +1 -1
- package/application/index.android.js.map +1 -1
- package/application/index.ios.js.map +1 -1
- package/application/scene-delegate-bridge.d.ts +60 -0
- package/application/scene-delegate-bridge.js +138 -0
- package/application/scene-delegate-bridge.js.map +1 -0
- package/application-settings/application-settings-common.js.map +1 -1
- package/application-settings/index.android.js.map +1 -1
- package/application-settings/index.ios.js.map +1 -1
- package/bundle-entry-points.js.map +1 -1
- package/cli-hooks/before-checkForChanges.mjs +0 -11
- package/color/color-common.js +16 -5
- package/color/color-common.js.map +1 -1
- package/color/color-types.js.map +1 -1
- package/color/color-utils.d.ts +4 -1
- package/color/color-utils.js +14 -9
- package/color/color-utils.js.map +1 -1
- package/color/index.android.js.map +1 -1
- package/color/index.ios.js.map +1 -1
- package/color/known-colors.js.map +1 -1
- package/config/config.interface.d.ts +44 -2
- package/config/config.interface.js.map +1 -1
- package/config/index.js.map +1 -1
- package/connectivity/index.android.js.map +1 -1
- package/connectivity/index.ios.js.map +1 -1
- package/console/index.js.map +1 -1
- package/core-types/animation-types.js.map +1 -1
- package/core-types/index.d.ts +25 -2
- package/core-types/index.js +23 -0
- package/core-types/index.js.map +1 -1
- package/core-types/validators.js.map +1 -1
- package/css/CSS3Parser.js +3 -2
- package/css/CSS3Parser.js.map +1 -1
- package/css/CSSNativeScript.js.map +1 -1
- package/css/css-tree-parser.js +5 -1
- package/css/css-tree-parser.js.map +1 -1
- package/css/lib/parse/index.js +5 -1
- package/css/lib/parse/index.js.map +1 -1
- package/css/parser.js +20 -3
- package/css/parser.js.map +1 -1
- package/css/reworkcss.js.map +1 -1
- package/css/system-classes.d.ts +9 -0
- package/css/system-classes.js +23 -0
- package/css/system-classes.js.map +1 -1
- package/css-mediaquery/index.js +4 -4
- package/css-mediaquery/index.js.map +1 -1
- package/css-value/reworkcss-value.js.map +1 -1
- package/data/observable/index.d.ts +23 -0
- package/data/observable/index.js +50 -9
- package/data/observable/index.js.map +1 -1
- package/data/observable-array/index.js.map +1 -1
- package/data/virtual-array/index.js.map +1 -1
- package/debugger/InspectorBackendCommands.js.map +1 -1
- package/debugger/devtools-elements-interfaces.js.map +1 -1
- package/debugger/devtools-elements.common.js.map +1 -1
- package/debugger/devtools-elements.js.map +1 -1
- package/debugger/dom-types.js +31 -1
- package/debugger/dom-types.js.map +1 -1
- package/debugger/index.js.map +1 -1
- package/debugger/webinspector-css.js.map +1 -1
- package/debugger/webinspector-dom.js.map +1 -1
- package/debugger/webinspector-network.android.js.map +1 -1
- package/debugger/webinspector-network.ios.js.map +1 -1
- package/file-system/file-system-access.android.js.map +1 -1
- package/file-system/file-system-access.ios.js +21 -13
- package/file-system/file-system-access.ios.js.map +1 -1
- package/file-system/index.d.ts +3 -3
- package/file-system/index.js.map +1 -1
- package/fps-meter/fps-native.android.js.map +1 -1
- package/fps-meter/fps-native.ios.js.map +1 -1
- package/fps-meter/index.js.map +1 -1
- package/global-types.d.ts +39 -33
- package/globals/global-utils.d.ts +6 -1
- package/globals/global-utils.js +10 -5
- package/globals/global-utils.js.map +1 -1
- package/globals/index.js +18 -5
- package/globals/index.js.map +1 -1
- package/globals/polyfills/polyfill-xhr.js.map +1 -1
- package/globals/polyfills/utils.js +2 -0
- package/globals/polyfills/utils.js.map +1 -1
- package/http/http-interfaces.js.map +1 -1
- package/http/http-request/http-request-common.js.map +1 -1
- package/http/http-request/index.android.js.map +1 -1
- package/http/http-request/index.ios.js.map +1 -1
- package/http/http-request-internal/http-request-internal-common.d.ts +5 -1
- package/http/http-request-internal/http-request-internal-common.js +10 -0
- package/http/http-request-internal/http-request-internal-common.js.map +1 -1
- package/http/http-request-internal/index.android.d.ts +7 -1
- package/http/http-request-internal/index.android.js +2 -2
- package/http/http-request-internal/index.android.js.map +1 -1
- package/http/http-request-internal/index.ios.d.ts +7 -1
- package/http/http-request-internal/index.ios.js +2 -2
- package/http/http-request-internal/index.ios.js.map +1 -1
- package/http/index.js.map +1 -1
- package/image-asset/image-asset-common.js.map +1 -1
- package/image-asset/index.android.js.map +1 -1
- package/image-asset/index.ios.js.map +1 -1
- package/image-source/image-source-common.js.map +1 -1
- package/image-source/index.android.js.map +1 -1
- package/image-source/index.ios.js.map +1 -1
- package/index.d.ts +2 -0
- package/index.js +1 -0
- package/index.js.map +1 -1
- package/inspector_modules.js +1 -1
- package/inspector_modules.js.map +1 -1
- package/matrix/index.js.map +1 -1
- package/media-query-list/index.js.map +1 -1
- package/module-name-resolver/helpers.js.map +1 -1
- package/module-name-resolver/index.js.map +1 -1
- package/module-name-resolver/non-bundle-workflow-compat.js.map +1 -1
- package/module-name-resolver/qualifier-matcher/index.js.map +1 -1
- package/native-window/index.d.ts +426 -0
- package/native-window/index.js +4 -0
- package/native-window/index.js.map +1 -0
- package/native-window/native-window-common.d.ts +153 -0
- package/native-window/native-window-common.js +340 -0
- package/native-window/native-window-common.js.map +1 -0
- package/native-window/native-window-interfaces.d.ts +186 -0
- package/native-window/native-window-interfaces.js +90 -0
- package/native-window/native-window-interfaces.js.map +1 -0
- package/native-window/native-window.android.d.ts +59 -0
- package/native-window/native-window.android.js +175 -0
- package/native-window/native-window.android.js.map +1 -0
- package/native-window/native-window.ios.d.ts +61 -0
- package/native-window/native-window.ios.js +220 -0
- package/native-window/native-window.ios.js.map +1 -0
- package/native-window/window-base.d.ts +111 -0
- package/native-window/window-base.js +91 -0
- package/native-window/window-base.js.map +1 -0
- package/package.json +3 -2
- package/platform/common.js.map +1 -1
- package/platform/device/index.android.js.map +1 -1
- package/platform/device/index.ios.js.map +1 -1
- package/platform/index.js.map +1 -1
- package/platform/screen/index.android.js.map +1 -1
- package/platform/screen/index.ios.d.ts +1 -0
- package/platform/screen/index.ios.js +6 -2
- package/platform/screen/index.ios.js.map +1 -1
- package/platforms/android/java/org/nativescript/widgets/BorderDrawable.java +5 -6
- package/platforms/android/java/org/nativescript/widgets/BoxShadowDrawable.java +0 -6
- package/platforms/android/java/org/nativescript/widgets/CommonLayoutParams.java +56 -0
- package/platforms/android/java/org/nativescript/widgets/ContentLayout.java +20 -4
- package/platforms/android/java/org/nativescript/widgets/CustomTransition.java +26 -9
- package/platforms/android/java/org/nativescript/widgets/FlexLine.java +3 -3
- package/platforms/android/java/org/nativescript/widgets/FlexboxLayout.java +194 -731
- package/platforms/android/java/org/nativescript/widgets/ImageView.java +2 -2
- package/platforms/android/java/org/nativescript/widgets/Utils.java +37 -9
- package/platforms/android/java/org/nativescript/widgets/ViewHelper.java +78 -0
- package/platforms/android/java/org/nativescript/widgets/image/BitmapOwner.java +1 -4
- package/platforms/android/java/org/nativescript/widgets/image/Worker.java +99 -76
- package/platforms/android/native-api-usage.json +11 -0
- package/platforms/ios/src/NativeScriptMainWindow.swift +72 -39
- package/profiling/index.js.map +1 -1
- package/references.d.ts +5 -2
- package/text/formatted-string.js.map +1 -1
- package/text/index.android.js.map +1 -1
- package/text/index.ios.js.map +1 -1
- package/text/span.js.map +1 -1
- package/text/text-common.js +1 -1
- package/text/text-common.js.map +1 -1
- package/timer/index.android.js.map +1 -1
- package/timer/index.ios.js.map +1 -1
- package/trace/index.d.ts +2 -2
- package/trace/index.js.map +1 -1
- package/ui/action-bar/action-bar-common.js.map +1 -1
- package/ui/action-bar/index.android.js +2 -7
- package/ui/action-bar/index.android.js.map +1 -1
- package/ui/action-bar/index.d.ts +13 -1
- package/ui/action-bar/index.ios.js +26 -0
- package/ui/action-bar/index.ios.js.map +1 -1
- package/ui/activity-indicator/activity-indicator-common.js.map +1 -1
- package/ui/activity-indicator/index.android.js.map +1 -1
- package/ui/activity-indicator/index.ios.js.map +1 -1
- package/ui/animation/animation-common.js.map +1 -1
- package/ui/animation/animation-interfaces.js.map +1 -1
- package/ui/animation/animation-shared.js.map +1 -1
- package/ui/animation/animation-types.js.map +1 -1
- package/ui/animation/index.android.js.map +1 -1
- package/ui/animation/index.ios.js.map +1 -1
- package/ui/animation/keyframe-animation.d.ts +3 -1
- package/ui/animation/keyframe-animation.js +72 -3
- package/ui/animation/keyframe-animation.js.map +1 -1
- package/ui/builder/binding-builder.js.map +1 -1
- package/ui/builder/component-builder/index.js.map +1 -1
- package/ui/builder/index.js +9 -1
- package/ui/builder/index.js.map +1 -1
- package/ui/button/button-common.js.map +1 -1
- package/ui/button/index.android.js.map +1 -1
- package/ui/button/index.ios.js.map +1 -1
- package/ui/content-view/index.js.map +1 -1
- package/ui/core/bindable/bindable-expressions.js.map +1 -1
- package/ui/core/bindable/bindable-resources.js.map +1 -1
- package/ui/core/bindable/bindable-types.js.map +1 -1
- package/ui/core/bindable/index.js +2 -1
- package/ui/core/bindable/index.js.map +1 -1
- package/ui/core/control-state-change/index.android.js.map +1 -1
- package/ui/core/control-state-change/index.ios.js.map +1 -1
- package/ui/core/properties/index.d.ts +37 -2
- package/ui/core/properties/index.js +205 -29
- package/ui/core/properties/index.js.map +1 -1
- package/ui/core/properties/property-shared.js +11 -2
- package/ui/core/properties/property-shared.js.map +1 -1
- package/ui/core/view/index.android.d.ts +5 -0
- package/ui/core/view/index.android.js +78 -6
- package/ui/core/view/index.android.js.map +1 -1
- package/ui/core/view/index.d.ts +58 -1
- package/ui/core/view/index.ios.d.ts +1 -0
- package/ui/core/view/index.ios.js +48 -11
- package/ui/core/view/index.ios.js.map +1 -1
- package/ui/core/view/view-common.d.ts +37 -0
- package/ui/core/view/view-common.js +81 -0
- package/ui/core/view/view-common.js.map +1 -1
- package/ui/core/view/view-helper/index.android.d.ts +1 -0
- package/ui/core/view/view-helper/index.android.js +8 -0
- package/ui/core/view/view-helper/index.android.js.map +1 -1
- package/ui/core/view/view-helper/index.d.ts +46 -0
- package/ui/core/view/view-helper/index.ios.d.ts +42 -0
- package/ui/core/view/view-helper/index.ios.js +170 -5
- package/ui/core/view/view-helper/index.ios.js.map +1 -1
- package/ui/core/view/view-helper/view-helper-common.js +21 -3
- package/ui/core/view/view-helper/view-helper-common.js.map +1 -1
- package/ui/core/view/view-helper/view-helper-shared.js.map +1 -1
- package/ui/core/view/view-interfaces.js.map +1 -1
- package/ui/core/view-base/index.js +75 -36
- package/ui/core/view-base/index.js.map +1 -1
- package/ui/core/view-base/utils.js.map +1 -1
- package/ui/core/weak-event-listener/index.js.map +1 -1
- package/ui/date-picker/date-picker-common.js.map +1 -1
- package/ui/date-picker/index.android.js.map +1 -1
- package/ui/date-picker/index.ios.js.map +1 -1
- package/ui/dialogs/dialogs-common.js.map +1 -1
- package/ui/dialogs/index.android.js +5 -5
- package/ui/dialogs/index.android.js.map +1 -1
- package/ui/dialogs/index.ios.js.map +1 -1
- package/ui/editable-text-base/editable-text-base-common.js.map +1 -1
- package/ui/editable-text-base/index.android.js +2 -1
- package/ui/editable-text-base/index.android.js.map +1 -1
- package/ui/editable-text-base/index.ios.js.map +1 -1
- package/ui/embedding/index.android.js.map +1 -1
- package/ui/embedding/index.ios.js.map +1 -1
- package/ui/enums/enums.js.map +1 -1
- package/ui/enums/index.js.map +1 -1
- package/ui/frame/activity.android.js.map +1 -1
- package/ui/frame/fragment.android.js.map +1 -1
- package/ui/frame/fragment.ios.js.map +1 -1
- package/ui/frame/fragment.transitions.android.d.ts +4 -4
- package/ui/frame/fragment.transitions.android.js +95 -78
- package/ui/frame/fragment.transitions.android.js.map +1 -1
- package/ui/frame/fragment.transitions.types.js.map +1 -1
- package/ui/frame/frame-common.d.ts +14 -2
- package/ui/frame/frame-common.js +51 -24
- package/ui/frame/frame-common.js.map +1 -1
- package/ui/frame/frame-constants.d.ts +9 -0
- package/ui/frame/frame-constants.js +10 -0
- package/ui/frame/frame-constants.js.map +1 -0
- package/ui/frame/frame-helper-for-android.d.ts +2 -2
- package/ui/frame/frame-helper-for-android.js +14 -5
- package/ui/frame/frame-helper-for-android.js.map +1 -1
- package/ui/frame/frame-helpers.js.map +1 -1
- package/ui/frame/frame-interfaces.d.ts +1 -1
- package/ui/frame/frame-interfaces.js.map +1 -1
- package/ui/frame/frame-stack.d.ts +22 -1
- package/ui/frame/frame-stack.js +43 -5
- package/ui/frame/frame-stack.js.map +1 -1
- package/ui/frame/index.android.d.ts +1 -2
- package/ui/frame/index.android.js +152 -53
- package/ui/frame/index.android.js.map +1 -1
- package/ui/frame/index.d.ts +15 -5
- package/ui/frame/index.ios.d.ts +1 -1
- package/ui/frame/index.ios.js +86 -26
- package/ui/frame/index.ios.js.map +1 -1
- package/ui/gestures/gestures-common.js.map +1 -1
- package/ui/gestures/gestures-types.d.ts +2 -0
- package/ui/gestures/gestures-types.js.map +1 -1
- package/ui/gestures/index.android.d.ts +1 -1
- package/ui/gestures/index.android.js +159 -124
- package/ui/gestures/index.android.js.map +1 -1
- package/ui/gestures/index.ios.js +30 -1
- package/ui/gestures/index.ios.js.map +1 -1
- package/ui/gestures/touch-manager.d.ts +1 -2
- package/ui/gestures/touch-manager.js +79 -50
- package/ui/gestures/touch-manager.js.map +1 -1
- package/ui/html-view/html-view-common.js.map +1 -1
- package/ui/html-view/index.android.js.map +1 -1
- package/ui/html-view/index.ios.js.map +1 -1
- package/ui/image/image-common.js +1 -1
- package/ui/image/image-common.js.map +1 -1
- package/ui/image/index.android.js +13 -1
- package/ui/image/index.android.js.map +1 -1
- package/ui/image/index.ios.js.map +1 -1
- package/ui/image/symbol-effects-common.js.map +1 -1
- package/ui/image/symbol-effects.android.js.map +1 -1
- package/ui/image/symbol-effects.ios.js.map +1 -1
- package/ui/image-cache/image-cache-common.js.map +1 -1
- package/ui/image-cache/index.android.js.map +1 -1
- package/ui/image-cache/index.ios.js.map +1 -1
- package/ui/index.d.ts +1 -1
- package/ui/index.js.map +1 -1
- package/ui/label/index.android.js.map +1 -1
- package/ui/label/index.ios.js.map +1 -1
- package/ui/layouts/absolute-layout/absolute-layout-common.js.map +1 -1
- package/ui/layouts/absolute-layout/index.android.js.map +1 -1
- package/ui/layouts/absolute-layout/index.ios.js +3 -0
- package/ui/layouts/absolute-layout/index.ios.js.map +1 -1
- package/ui/layouts/dock-layout/dock-layout-common.js.map +1 -1
- package/ui/layouts/dock-layout/index.android.js.map +1 -1
- package/ui/layouts/dock-layout/index.ios.js +3 -0
- package/ui/layouts/dock-layout/index.ios.js.map +1 -1
- package/ui/layouts/flexbox-layout/flexbox-layout-common.d.ts +7 -0
- package/ui/layouts/flexbox-layout/flexbox-layout-common.js +18 -0
- package/ui/layouts/flexbox-layout/flexbox-layout-common.js.map +1 -1
- package/ui/layouts/flexbox-layout/index.android.d.ts +5 -0
- package/ui/layouts/flexbox-layout/index.android.js +15 -0
- package/ui/layouts/flexbox-layout/index.android.js.map +1 -1
- package/ui/layouts/flexbox-layout/index.d.ts +19 -1
- package/ui/layouts/flexbox-layout/index.ios.d.ts +2 -0
- package/ui/layouts/flexbox-layout/index.ios.js +246 -195
- package/ui/layouts/flexbox-layout/index.ios.js.map +1 -1
- package/ui/layouts/grid-layout/grid-layout-common.js.map +1 -1
- package/ui/layouts/grid-layout/index.android.js.map +1 -1
- package/ui/layouts/grid-layout/index.ios.js +3 -0
- package/ui/layouts/grid-layout/index.ios.js.map +1 -1
- package/ui/layouts/index.js.map +1 -1
- package/ui/layouts/layout-base-common.d.ts +1 -0
- package/ui/layouts/layout-base-common.js +23 -1
- package/ui/layouts/layout-base-common.js.map +1 -1
- package/ui/layouts/layout-base.android.js.map +1 -1
- package/ui/layouts/layout-base.ios.js.map +1 -1
- package/ui/layouts/liquid-glass/index.android.js.map +1 -1
- package/ui/layouts/liquid-glass/index.ios.d.ts +0 -1
- package/ui/layouts/liquid-glass/index.ios.js +2 -43
- package/ui/layouts/liquid-glass/index.ios.js.map +1 -1
- package/ui/layouts/liquid-glass/liquid-glass-common.js.map +1 -1
- package/ui/layouts/liquid-glass-container/index.android.js.map +1 -1
- package/ui/layouts/liquid-glass-container/index.ios.d.ts +0 -1
- package/ui/layouts/liquid-glass-container/index.ios.js +2 -43
- package/ui/layouts/liquid-glass-container/index.ios.js.map +1 -1
- package/ui/layouts/liquid-glass-container/liquid-glass-container-common.js.map +1 -1
- package/ui/layouts/root-layout/index.android.js.map +1 -1
- package/ui/layouts/root-layout/index.ios.js.map +1 -1
- package/ui/layouts/root-layout/root-layout-common.js.map +1 -1
- package/ui/layouts/root-layout/root-layout-stack.js.map +1 -1
- package/ui/layouts/stack-layout/index.android.js.map +1 -1
- package/ui/layouts/stack-layout/index.ios.js +3 -0
- package/ui/layouts/stack-layout/index.ios.js.map +1 -1
- package/ui/layouts/stack-layout/stack-layout-common.js.map +1 -1
- package/ui/layouts/wrap-layout/index.android.js.map +1 -1
- package/ui/layouts/wrap-layout/index.ios.js +3 -0
- package/ui/layouts/wrap-layout/index.ios.js.map +1 -1
- package/ui/layouts/wrap-layout/wrap-layout-common.js.map +1 -1
- package/ui/list-picker/index.android.js.map +1 -1
- package/ui/list-picker/index.ios.js.map +1 -1
- package/ui/list-picker/list-picker-common.js.map +1 -1
- package/ui/list-view/index.android.js +2 -2
- package/ui/list-view/index.android.js.map +1 -1
- package/ui/list-view/index.d.ts +47 -3
- package/ui/list-view/index.ios.d.ts +13 -3
- package/ui/list-view/index.ios.js +132 -41
- package/ui/list-view/index.ios.js.map +1 -1
- package/ui/list-view/list-view-common.d.ts +19 -0
- package/ui/list-view/list-view-common.js +30 -0
- package/ui/list-view/list-view-common.js.map +1 -1
- package/ui/page/events.js.map +1 -1
- package/ui/page/index.android.js.map +1 -1
- package/ui/page/index.d.ts +1 -1
- package/ui/page/index.ios.d.ts +3 -1
- package/ui/page/index.ios.js +26 -17
- package/ui/page/index.ios.js.map +1 -1
- package/ui/page/page-common.d.ts +5 -1
- package/ui/page/page-common.js.map +1 -1
- package/ui/placeholder/index.android.js.map +1 -1
- package/ui/placeholder/index.js.map +1 -1
- package/ui/placeholder/placeholder-common.js.map +1 -1
- package/ui/progress/index.android.js.map +1 -1
- package/ui/progress/index.ios.js.map +1 -1
- package/ui/progress/progress-common.js.map +1 -1
- package/ui/proxy-view-container/index.js.map +1 -1
- package/ui/repeater/index.d.ts +2 -1
- package/ui/repeater/index.js.map +1 -1
- package/ui/scroll-view/index.android.d.ts +2 -1
- package/ui/scroll-view/index.android.js +4 -1
- package/ui/scroll-view/index.android.js.map +1 -1
- package/ui/scroll-view/index.d.ts +53 -0
- package/ui/scroll-view/index.ios.d.ts +13 -1
- package/ui/scroll-view/index.ios.js +100 -20
- package/ui/scroll-view/index.ios.js.map +1 -1
- package/ui/scroll-view/scroll-view-common.d.ts +13 -0
- package/ui/scroll-view/scroll-view-common.js +27 -0
- package/ui/scroll-view/scroll-view-common.js.map +1 -1
- package/ui/search-bar/index.android.js.map +1 -1
- package/ui/search-bar/index.ios.js.map +1 -1
- package/ui/search-bar/search-bar-common.js.map +1 -1
- package/ui/segmented-bar/index.android.js.map +1 -1
- package/ui/segmented-bar/index.ios.js.map +1 -1
- package/ui/segmented-bar/segmented-bar-common.d.ts +5 -1
- package/ui/segmented-bar/segmented-bar-common.js +6 -1
- package/ui/segmented-bar/segmented-bar-common.js.map +1 -1
- package/ui/slider/index.android.js.map +1 -1
- package/ui/slider/index.ios.js.map +1 -1
- package/ui/slider/slider-common.js.map +1 -1
- package/ui/split-view/index.android.js.map +1 -1
- package/ui/split-view/index.ios.js.map +1 -1
- package/ui/split-view/split-view-common.js.map +1 -1
- package/ui/styling/background-common.d.ts +2 -0
- package/ui/styling/background-common.js +8 -0
- package/ui/styling/background-common.js.map +1 -1
- package/ui/styling/background.android.d.ts +4 -1
- package/ui/styling/background.android.js +5 -2
- package/ui/styling/background.android.js.map +1 -1
- package/ui/styling/background.d.ts +1 -1
- package/ui/styling/background.ios.js +9 -2
- package/ui/styling/background.ios.js.map +1 -1
- package/ui/styling/box-shadow.js.map +1 -1
- package/ui/styling/clip-path-function.js.map +1 -1
- package/ui/styling/converters.js.map +1 -1
- package/ui/styling/css-animation-parser.js.map +1 -1
- package/ui/styling/css-selector.d.ts +60 -13
- package/ui/styling/css-selector.js +311 -50
- package/ui/styling/css-selector.js.map +1 -1
- package/ui/styling/css-shadow.js.map +1 -1
- package/ui/styling/css-stroke.js.map +1 -1
- package/ui/styling/css-transform.js.map +1 -1
- package/ui/styling/css-utils.d.ts +16 -0
- package/ui/styling/css-utils.js +121 -7
- package/ui/styling/css-utils.js.map +1 -1
- package/ui/styling/font-common.js.map +1 -1
- package/ui/styling/font-interfaces.js.map +1 -1
- package/ui/styling/font.android.js.map +1 -1
- package/ui/styling/font.ios.js.map +1 -1
- package/ui/styling/length-shared.d.ts +2 -0
- package/ui/styling/length-shared.js +29 -2
- package/ui/styling/length-shared.js.map +1 -1
- package/ui/styling/linear-gradient.js.map +1 -1
- package/ui/styling/style/index.d.ts +16 -0
- package/ui/styling/style/index.js +1 -0
- package/ui/styling/style/index.js.map +1 -1
- package/ui/styling/style-properties.d.ts +5 -0
- package/ui/styling/style-properties.js +172 -101
- package/ui/styling/style-properties.js.map +1 -1
- package/ui/styling/style-scope.d.ts +24 -3
- package/ui/styling/style-scope.js +455 -63
- package/ui/styling/style-scope.js.map +1 -1
- package/ui/styling/styling-profile.js.map +1 -1
- package/ui/styling/styling-shared.js.map +1 -1
- package/ui/switch/index.android.js.map +1 -1
- package/ui/switch/index.ios.js +5 -1
- package/ui/switch/index.ios.js.map +1 -1
- package/ui/switch/switch-common.js.map +1 -1
- package/ui/tab-view/index.android.js +4 -1
- package/ui/tab-view/index.android.js.map +1 -1
- package/ui/tab-view/index.d.ts +5 -3
- package/ui/tab-view/index.ios.d.ts +2 -1
- package/ui/tab-view/index.ios.js +81 -18
- package/ui/tab-view/index.ios.js.map +1 -1
- package/ui/tab-view/tab-view-common.d.ts +6 -1
- package/ui/tab-view/tab-view-common.js +17 -1
- package/ui/tab-view/tab-view-common.js.map +1 -1
- package/ui/text-base/formatted-string.js.map +1 -1
- package/ui/text-base/index.android.js +5 -8
- package/ui/text-base/index.android.js.map +1 -1
- package/ui/text-base/index.ios.d.ts +3 -0
- package/ui/text-base/index.ios.js +25 -3
- package/ui/text-base/index.ios.js.map +1 -1
- package/ui/text-base/span.js.map +1 -1
- package/ui/text-base/text-base-common.js.map +1 -1
- package/ui/text-field/index.android.js.map +1 -1
- package/ui/text-field/index.ios.js +13 -5
- package/ui/text-field/index.ios.js.map +1 -1
- package/ui/text-field/text-field-common.js.map +1 -1
- package/ui/text-view/index.android.js.map +1 -1
- package/ui/text-view/index.ios.js.map +1 -1
- package/ui/text-view/text-view-common.js.map +1 -1
- package/ui/time-picker/index.android.js.map +1 -1
- package/ui/time-picker/index.ios.js.map +1 -1
- package/ui/time-picker/time-picker-common.js.map +1 -1
- package/ui/transition/fade-transition.android.js.map +1 -1
- package/ui/transition/fade-transition.ios.js.map +1 -1
- package/ui/transition/flip-transition.android.js.map +1 -1
- package/ui/transition/index.android.js.map +1 -1
- package/ui/transition/index.d.ts +2 -1
- package/ui/transition/index.ios.js.map +1 -1
- package/ui/transition/modal-transition.android.js.map +1 -1
- package/ui/transition/modal-transition.ios.js +33 -5
- package/ui/transition/modal-transition.ios.js.map +1 -1
- package/ui/transition/page-transition.android.d.ts +4 -0
- package/ui/transition/page-transition.android.js +174 -45
- package/ui/transition/page-transition.android.js.map +1 -1
- package/ui/transition/page-transition.ios.d.ts +5 -0
- package/ui/transition/page-transition.ios.js +298 -36
- package/ui/transition/page-transition.ios.js.map +1 -1
- package/ui/transition/shared-transition-helper.android.d.ts +3 -0
- package/ui/transition/shared-transition-helper.android.js +9 -0
- package/ui/transition/shared-transition-helper.android.js.map +1 -1
- package/ui/transition/shared-transition-helper.d.ts +7 -0
- package/ui/transition/shared-transition-helper.ios.d.ts +48 -0
- package/ui/transition/shared-transition-helper.ios.js +977 -95
- package/ui/transition/shared-transition-helper.ios.js.map +1 -1
- package/ui/transition/shared-transition.d.ts +134 -0
- package/ui/transition/shared-transition.js +90 -2
- package/ui/transition/shared-transition.js.map +1 -1
- package/ui/transition/slide-transition.android.js.map +1 -1
- package/ui/transition/slide-transition.ios.js.map +1 -1
- package/ui/utils.android.js.map +1 -1
- package/ui/utils.d.ts +2 -0
- package/ui/utils.ios.js.map +1 -1
- package/ui/web-view/index.android.js.map +1 -1
- package/ui/web-view/index.ios.js.map +1 -1
- package/ui/web-view/web-view-common.js.map +1 -1
- package/ui/web-view/web-view-interfaces.js.map +1 -1
- package/utils/animation-helpers.js.map +1 -1
- package/utils/common.js.map +1 -1
- package/utils/constants.android.js.map +1 -1
- package/utils/constants.ios.js.map +1 -1
- package/utils/debug-source.js.map +1 -1
- package/utils/debug.js.map +1 -1
- package/utils/index.android.js.map +1 -1
- package/utils/index.ios.js.map +1 -1
- package/utils/layout-helper/index.android.js.map +1 -1
- package/utils/layout-helper/index.ios.js +11 -3
- package/utils/layout-helper/index.ios.js.map +1 -1
- package/utils/layout-helper/layout-helper-common.js.map +1 -1
- package/utils/layout-helper/layout-helper-shared.js.map +1 -1
- package/utils/lazy.js.map +1 -1
- package/utils/macrotask-scheduler.js.map +1 -1
- package/utils/mainthread-helper.android.js.map +1 -1
- package/utils/mainthread-helper.ios.js.map +1 -1
- package/utils/module-merge.js.map +1 -1
- package/utils/native-helper-for-android.js +6 -2
- package/utils/native-helper-for-android.js.map +1 -1
- package/utils/native-helper.android.d.ts +66 -2
- package/utils/native-helper.android.js.map +1 -1
- package/utils/native-helper.d.ts +2 -2
- package/utils/native-helper.ios.d.ts +52 -2
- package/utils/native-helper.ios.js +35 -5
- package/utils/native-helper.ios.js.map +1 -1
- package/utils/native-helper.types.d.ts +2 -0
- package/utils/number-utils.js.map +1 -1
- package/utils/platform-check.d.ts +1 -1
- package/utils/platform-check.js.map +1 -1
- package/utils/shared.js.map +1 -1
- package/utils/types.js.map +1 -1
- package/utils/utils-shared.js.map +1 -1
- package/wgc/atob.js.map +1 -1
- package/wgc/btoa.js.map +1 -1
- package/wgc/crypto/SubtleCrypto.js.map +1 -1
- package/wgc/crypto/index.d.ts +1 -1
- package/wgc/crypto/index.js +12 -8
- package/wgc/crypto/index.js.map +1 -1
- package/wgc/index.js.map +1 -1
- package/xhr/index.js.map +1 -1
- package/xml/index.js.map +1 -1
|
@@ -1,13 +1,29 @@
|
|
|
1
1
|
import * as ApplicationSettings from '../application-settings';
|
|
2
2
|
import { CoreTypes } from '../core-types';
|
|
3
3
|
import { profile } from '../profiling';
|
|
4
|
+
import { isEmbedded } from '../ui/embedding';
|
|
4
5
|
import { SDK_VERSION } from '../utils/constants';
|
|
6
|
+
import { dataSerialize } from '../utils';
|
|
5
7
|
import { ApplicationCommon } from './application-common';
|
|
8
|
+
import { Trace } from '../trace';
|
|
9
|
+
import { AndroidNativeWindow } from '../native-window/native-window.android';
|
|
10
|
+
import { NativeWindowEvents } from '../native-window/native-window-interfaces';
|
|
6
11
|
import { fontScaleChanged } from '../accessibility/font-scale.android';
|
|
7
12
|
import { androidGetForegroundActivity, androidGetStartActivity, androidSetForegroundActivity, androidSetStartActivity } from './helpers';
|
|
8
13
|
import { getImageFetcher, getNativeApp, getRootView, initImageCache, setApplicationPropertiesCallback, setAppMainEntry, setNativeApp, setRootView, setToggleApplicationEventListenersCallback } from './helpers-common';
|
|
9
14
|
import { getNativeScriptGlobals } from '../globals/global-utils';
|
|
10
15
|
import lazy from '../utils/lazy';
|
|
16
|
+
const WINDOW_ID_EXTRA = 'com.tns.activity.windowId';
|
|
17
|
+
let multiWindowWarned = false;
|
|
18
|
+
function warnMultiWindowIsExperimental() {
|
|
19
|
+
if (multiWindowWarned) {
|
|
20
|
+
return;
|
|
21
|
+
}
|
|
22
|
+
multiWindowWarned = true;
|
|
23
|
+
const message = 'Application.android.openWindow() is experimental. The start activity must not use launchMode="singleTask" (the app template default) or "singleInstance" in AndroidManifest.xml, or Android hands the launch intent to the existing activity instead of opening a second one; use "singleInstancePerTask" (API 31+) or "standard".';
|
|
24
|
+
Trace.write(message, Trace.categories.Debug, Trace.messageType.warn);
|
|
25
|
+
console.warn(message);
|
|
26
|
+
}
|
|
11
27
|
let NativeScriptLifecycleCallbacks_;
|
|
12
28
|
function initNativeScriptLifecycleCallbacks() {
|
|
13
29
|
if (NativeScriptLifecycleCallbacks_) {
|
|
@@ -29,7 +45,21 @@ function initNativeScriptLifecycleCallbacks() {
|
|
|
29
45
|
if (!this.nativescriptActivity && "isNativeScriptActivity" in activity) {
|
|
30
46
|
this.nativescriptActivity = activity;
|
|
31
47
|
}
|
|
32
|
-
|
|
48
|
+
var savedWindowId = savedInstanceState === null || savedInstanceState === void 0 ? void 0 : savedInstanceState.getString(WINDOW_ID_EXTRA);
|
|
49
|
+
var knownWindow = savedWindowId ? Application.android.getWindowById(savedWindowId) : undefined;
|
|
50
|
+
var nativeWindow;
|
|
51
|
+
if ((knownWindow === null || knownWindow === void 0 ? void 0 : knownWindow.state) === "detached") {
|
|
52
|
+
knownWindow._reattach(activity);
|
|
53
|
+
nativeWindow = knownWindow;
|
|
54
|
+
}
|
|
55
|
+
else {
|
|
56
|
+
var isPrimary = Application.android._getWindows().length === 0;
|
|
57
|
+
nativeWindow = new AndroidNativeWindow(activity, savedWindowId || AndroidNativeWindow.newWindowId(), isPrimary, isEmbedded() ? "embedded" : "application");
|
|
58
|
+
Application.android._registerWindow(nativeWindow);
|
|
59
|
+
}
|
|
60
|
+
nativeWindow._registerConfigurationCallbacks();
|
|
61
|
+
nativeWindow._notifyEvent(NativeWindowEvents.attached);
|
|
62
|
+
this.notifyActivityCreated(activity, savedInstanceState, nativeWindow);
|
|
33
63
|
if (Application.hasListeners(Application.displayedEvent)) {
|
|
34
64
|
this.subscribeForGlobalLayout(activity);
|
|
35
65
|
}
|
|
@@ -47,38 +77,98 @@ function initNativeScriptLifecycleCallbacks() {
|
|
|
47
77
|
Application.android.setStartActivity(this.nativescriptActivity);
|
|
48
78
|
}
|
|
49
79
|
}
|
|
80
|
+
var nativeWindow = Application.android._getWindowForActivity(activity);
|
|
81
|
+
if (nativeWindow) {
|
|
82
|
+
Application.android._setWindowActive(nativeWindow, false, activity);
|
|
83
|
+
nativeWindow._surfaceGone = true;
|
|
84
|
+
var isClosing = activity.isFinishing();
|
|
85
|
+
if (isClosing) {
|
|
86
|
+
nativeWindow._notifyEvent(NativeWindowEvents.close);
|
|
87
|
+
}
|
|
88
|
+
nativeWindow.notify({
|
|
89
|
+
eventName: NativeWindowEvents.activityDestroyed,
|
|
90
|
+
object: nativeWindow,
|
|
91
|
+
window: nativeWindow,
|
|
92
|
+
activity: activity,
|
|
93
|
+
});
|
|
94
|
+
if (isClosing) {
|
|
95
|
+
Application.android._unregisterWindow(nativeWindow);
|
|
96
|
+
}
|
|
97
|
+
else {
|
|
98
|
+
nativeWindow._detach();
|
|
99
|
+
}
|
|
100
|
+
}
|
|
50
101
|
Application.android.notify({
|
|
51
102
|
eventName: Application.android.activityDestroyedEvent,
|
|
52
103
|
object: Application.android,
|
|
104
|
+
window: nativeWindow,
|
|
53
105
|
activity: activity,
|
|
54
106
|
});
|
|
107
|
+
if (activity.isFinishing() && Application.android._getWindows().length === 0) {
|
|
108
|
+
Application.android.notify({
|
|
109
|
+
eventName: Application.exitEvent,
|
|
110
|
+
object: Application.android,
|
|
111
|
+
android: activity,
|
|
112
|
+
});
|
|
113
|
+
}
|
|
55
114
|
gc();
|
|
56
115
|
};
|
|
57
116
|
NativeScriptLifecycleCallbacksImpl.prototype.onActivityPaused = function (activity) {
|
|
117
|
+
var nativeWindow = Application.android._getWindowForActivity(activity);
|
|
58
118
|
if ("isNativeScriptActivity" in activity) {
|
|
59
|
-
Application.
|
|
60
|
-
|
|
119
|
+
Application.android._setWindowActive(nativeWindow, false, activity);
|
|
120
|
+
}
|
|
121
|
+
if (nativeWindow) {
|
|
122
|
+
nativeWindow._notifyEvent(NativeWindowEvents.deactivate);
|
|
123
|
+
nativeWindow.notify({
|
|
124
|
+
eventName: NativeWindowEvents.activityPaused,
|
|
125
|
+
object: nativeWindow,
|
|
126
|
+
window: nativeWindow,
|
|
61
127
|
activity: activity,
|
|
62
128
|
});
|
|
63
129
|
}
|
|
64
130
|
Application.android.notify({
|
|
65
131
|
eventName: Application.android.activityPausedEvent,
|
|
66
132
|
object: Application.android,
|
|
133
|
+
window: nativeWindow,
|
|
67
134
|
activity: activity,
|
|
68
135
|
});
|
|
69
136
|
};
|
|
70
137
|
NativeScriptLifecycleCallbacksImpl.prototype.onActivityResumed = function (activity) {
|
|
71
138
|
Application.android.setForegroundActivity(activity);
|
|
139
|
+
var nativeWindow = Application.android._getWindowForActivity(activity);
|
|
140
|
+
if (nativeWindow) {
|
|
141
|
+
nativeWindow._notifyEvent(NativeWindowEvents.activate);
|
|
142
|
+
nativeWindow.notify({
|
|
143
|
+
eventName: NativeWindowEvents.activityResumed,
|
|
144
|
+
object: nativeWindow,
|
|
145
|
+
window: nativeWindow,
|
|
146
|
+
activity: activity,
|
|
147
|
+
});
|
|
148
|
+
}
|
|
72
149
|
Application.android.notify({
|
|
73
150
|
eventName: Application.android.activityResumedEvent,
|
|
74
151
|
object: Application.android,
|
|
152
|
+
window: nativeWindow,
|
|
75
153
|
activity: activity,
|
|
76
154
|
});
|
|
77
155
|
};
|
|
78
156
|
NativeScriptLifecycleCallbacksImpl.prototype.onActivitySaveInstanceState = function (activity, bundle) {
|
|
157
|
+
var nativeWindow = Application.android._getWindowForActivity(activity);
|
|
158
|
+
if (nativeWindow) {
|
|
159
|
+
bundle.putString(WINDOW_ID_EXTRA, nativeWindow.id);
|
|
160
|
+
nativeWindow.notify({
|
|
161
|
+
eventName: NativeWindowEvents.saveActivityState,
|
|
162
|
+
object: nativeWindow,
|
|
163
|
+
window: nativeWindow,
|
|
164
|
+
activity: activity,
|
|
165
|
+
bundle: bundle,
|
|
166
|
+
});
|
|
167
|
+
}
|
|
79
168
|
Application.android.notify({
|
|
80
169
|
eventName: Application.android.saveActivityStateEvent,
|
|
81
170
|
object: Application.android,
|
|
171
|
+
window: nativeWindow,
|
|
82
172
|
activity: activity,
|
|
83
173
|
bundle: bundle,
|
|
84
174
|
});
|
|
@@ -92,9 +182,20 @@ function initNativeScriptLifecycleCallbacks() {
|
|
|
92
182
|
activity: activity,
|
|
93
183
|
});
|
|
94
184
|
}
|
|
185
|
+
var nativeWindow = Application.android._getWindowForActivity(activity);
|
|
186
|
+
if (nativeWindow) {
|
|
187
|
+
nativeWindow._notifyEvent(NativeWindowEvents.foreground);
|
|
188
|
+
nativeWindow.notify({
|
|
189
|
+
eventName: NativeWindowEvents.activityStarted,
|
|
190
|
+
object: nativeWindow,
|
|
191
|
+
window: nativeWindow,
|
|
192
|
+
activity: activity,
|
|
193
|
+
});
|
|
194
|
+
}
|
|
95
195
|
Application.android.notify({
|
|
96
196
|
eventName: Application.android.activityStartedEvent,
|
|
97
197
|
object: Application.android,
|
|
198
|
+
window: nativeWindow,
|
|
98
199
|
activity: activity,
|
|
99
200
|
});
|
|
100
201
|
};
|
|
@@ -106,9 +207,20 @@ function initNativeScriptLifecycleCallbacks() {
|
|
|
106
207
|
activity: activity,
|
|
107
208
|
});
|
|
108
209
|
}
|
|
210
|
+
var nativeWindow = Application.android._getWindowForActivity(activity);
|
|
211
|
+
if (nativeWindow) {
|
|
212
|
+
nativeWindow._notifyEvent(NativeWindowEvents.background);
|
|
213
|
+
nativeWindow.notify({
|
|
214
|
+
eventName: NativeWindowEvents.activityStopped,
|
|
215
|
+
object: nativeWindow,
|
|
216
|
+
window: nativeWindow,
|
|
217
|
+
activity: activity,
|
|
218
|
+
});
|
|
219
|
+
}
|
|
109
220
|
Application.android.notify({
|
|
110
221
|
eventName: Application.android.activityStoppedEvent,
|
|
111
222
|
object: Application.android,
|
|
223
|
+
window: nativeWindow,
|
|
112
224
|
activity: activity,
|
|
113
225
|
});
|
|
114
226
|
};
|
|
@@ -124,10 +236,20 @@ function initNativeScriptLifecycleCallbacks() {
|
|
|
124
236
|
activity.setTheme(setThemeOnLaunch);
|
|
125
237
|
}
|
|
126
238
|
};
|
|
127
|
-
NativeScriptLifecycleCallbacksImpl.prototype.notifyActivityCreated = function (activity, bundle) {
|
|
239
|
+
NativeScriptLifecycleCallbacksImpl.prototype.notifyActivityCreated = function (activity, bundle, nativeWindow) {
|
|
240
|
+
if (nativeWindow) {
|
|
241
|
+
nativeWindow.notify({
|
|
242
|
+
eventName: NativeWindowEvents.activityCreated,
|
|
243
|
+
object: nativeWindow,
|
|
244
|
+
window: nativeWindow,
|
|
245
|
+
activity: activity,
|
|
246
|
+
bundle: bundle,
|
|
247
|
+
});
|
|
248
|
+
}
|
|
128
249
|
Application.android.notify({
|
|
129
250
|
eventName: Application.android.activityCreatedEvent,
|
|
130
251
|
object: Application.android,
|
|
252
|
+
window: nativeWindow,
|
|
131
253
|
activity: activity,
|
|
132
254
|
bundle: bundle,
|
|
133
255
|
});
|
|
@@ -262,6 +384,10 @@ export class AndroidApplication extends ApplicationCommon {
|
|
|
262
384
|
this.activityRequestPermissionsEvent = AndroidApplication.activityRequestPermissionsEvent;
|
|
263
385
|
this.dialogOnCreateViewEvent = AndroidApplication.activityRequestPermissionsEvent;
|
|
264
386
|
this.configurationChangeEvent = AndroidApplication.activityRequestPermissionsEvent;
|
|
387
|
+
// Windows currently active. Membership, not a count, so a repeated or missing lifecycle
|
|
388
|
+
// callback cannot drift the aggregate. The registry owns window lifetime, so nothing here
|
|
389
|
+
// outlives the window itself.
|
|
390
|
+
this._activeWindows = new Set();
|
|
265
391
|
this._registeredReceivers = {};
|
|
266
392
|
this._registeredReceiversById = {};
|
|
267
393
|
this._nextReceiverId = 1;
|
|
@@ -297,6 +423,10 @@ export class AndroidApplication extends ApplicationCommon {
|
|
|
297
423
|
}
|
|
298
424
|
onConfigurationChanged(configuration) {
|
|
299
425
|
const diff = configuration.diff(this._prevConfiguration);
|
|
426
|
+
// The application context reports the app-wide configuration, which a window on a
|
|
427
|
+
// second display or in split-screen does not necessarily share, so the primary
|
|
428
|
+
// window is asked first. Each window tracks its own through its activity.
|
|
429
|
+
const primaryWindow = this.primaryWindow;
|
|
300
430
|
if ((diff & 128) /* ActivityInfo.CONFIG_ORIENTATION */ !== 0) {
|
|
301
431
|
const nativeApp = Application.android.getNativeApplication();
|
|
302
432
|
const screenOrientation = nativeApp.getSystemService(android.content.Context.WINDOW_SERVICE).getDefaultDisplay().getRotation();
|
|
@@ -314,16 +444,16 @@ export class AndroidApplication extends ApplicationCommon {
|
|
|
314
444
|
default:
|
|
315
445
|
break;
|
|
316
446
|
}
|
|
317
|
-
this.setOrientation(this.getOrientationValue(configuration), degrees);
|
|
447
|
+
this.setOrientation(primaryWindow?.orientation() ?? this.getOrientationValue(configuration), degrees);
|
|
318
448
|
}
|
|
319
449
|
if ((diff & 512) /* ActivityInfo.CONFIG_UI_MODE */ !== 0) {
|
|
320
|
-
this.setSystemAppearance(this.getSystemAppearanceValue(configuration));
|
|
450
|
+
this.setSystemAppearance(primaryWindow?.systemAppearance() ?? this.getSystemAppearanceValue(configuration));
|
|
321
451
|
}
|
|
322
452
|
if ((diff & 1073741824) /* ActivityInfo.CONFIG_FONT_SCALE */ !== 0) {
|
|
323
453
|
fontScaleChanged(Number(configuration.fontScale));
|
|
324
454
|
}
|
|
325
455
|
if ((diff & 8192) /* ActivityInfo.CONFIG_LAYOUT_DIRECTION */ !== 0) {
|
|
326
|
-
this.setLayoutDirection(this.getLayoutDirectionValue(configuration));
|
|
456
|
+
this.setLayoutDirection(primaryWindow?.layoutDirection() ?? this.getLayoutDirectionValue(configuration));
|
|
327
457
|
}
|
|
328
458
|
this.notify({ eventName: this.configurationChangeEvent, configuration, diff });
|
|
329
459
|
this._prevConfiguration = new android.content.res.Configuration(configuration);
|
|
@@ -353,6 +483,9 @@ export class AndroidApplication extends ApplicationCommon {
|
|
|
353
483
|
const nativeApp = this.getNativeApplication();
|
|
354
484
|
this.init(nativeApp);
|
|
355
485
|
}
|
|
486
|
+
// The activity lifecycle callbacks are registered but no activity has been created yet,
|
|
487
|
+
// so this always precedes the first `windowOpen`.
|
|
488
|
+
this.notifyReady();
|
|
356
489
|
}
|
|
357
490
|
get startActivity() {
|
|
358
491
|
return androidGetStartActivity();
|
|
@@ -437,7 +570,7 @@ export class AndroidApplication extends ApplicationCommon {
|
|
|
437
570
|
}
|
|
438
571
|
}
|
|
439
572
|
getRegisteredBroadcastReceiver(intentFilter) {
|
|
440
|
-
return this._registeredReceivers[intentFilter]?.[0]
|
|
573
|
+
return this._registeredReceivers[intentFilter]?.[0]?.receiver;
|
|
441
574
|
}
|
|
442
575
|
getRegisteredBroadcastReceivers(intentFilter) {
|
|
443
576
|
const receiversInfo = this._registeredReceivers[intentFilter];
|
|
@@ -446,6 +579,100 @@ export class AndroidApplication extends ApplicationCommon {
|
|
|
446
579
|
}
|
|
447
580
|
return [];
|
|
448
581
|
}
|
|
582
|
+
// --- NativeWindow registry ---
|
|
583
|
+
/**
|
|
584
|
+
* @internal - Get a NativeWindow by its activity.
|
|
585
|
+
*/
|
|
586
|
+
_getWindowForActivity(activity) {
|
|
587
|
+
return this._windows.find((nw) => nw.android?.activity === activity);
|
|
588
|
+
}
|
|
589
|
+
/**
|
|
590
|
+
* @internal - Feeds a window's active state into the application-level 'resume'/'suspend'
|
|
591
|
+
* events, which describe the app as a whole: they are raised when the first window becomes
|
|
592
|
+
* active and when the last active one resigns. Callers decide which activities may speak
|
|
593
|
+
* for the app; every window reaching here participates.
|
|
594
|
+
*/
|
|
595
|
+
_setWindowActive(nativeWindow, active, activity) {
|
|
596
|
+
if (this._trackWindowActive(nativeWindow, active)) {
|
|
597
|
+
this.setSuspended(!active, {
|
|
598
|
+
// todo: deprecate event.android in favor of event.activity
|
|
599
|
+
android: activity,
|
|
600
|
+
activity,
|
|
601
|
+
});
|
|
602
|
+
}
|
|
603
|
+
}
|
|
604
|
+
/**
|
|
605
|
+
* @returns whether the set flipped between empty and non-empty, which is the only point
|
|
606
|
+
* at which app-level state changes.
|
|
607
|
+
*/
|
|
608
|
+
_trackWindowActive(nativeWindow, active) {
|
|
609
|
+
const wasPopulated = this._activeWindows.size > 0;
|
|
610
|
+
// An activity with no registered window cannot join the aggregate, so it only speaks
|
|
611
|
+
// for the app while no window holds the state.
|
|
612
|
+
if (!nativeWindow) {
|
|
613
|
+
return !wasPopulated;
|
|
614
|
+
}
|
|
615
|
+
if (active) {
|
|
616
|
+
this._activeWindows.add(nativeWindow);
|
|
617
|
+
}
|
|
618
|
+
else {
|
|
619
|
+
this._activeWindows.delete(nativeWindow);
|
|
620
|
+
}
|
|
621
|
+
return wasPopulated !== this._activeWindows.size > 0;
|
|
622
|
+
}
|
|
623
|
+
// --- Multi-window support ---
|
|
624
|
+
/**
|
|
625
|
+
* Opens a new window by launching the start activity into its own task.
|
|
626
|
+
*
|
|
627
|
+
* @param options Options for the new window. `options.data` is put on the launch
|
|
628
|
+
* intent as extras and surfaces as the window's `data`.
|
|
629
|
+
*
|
|
630
|
+
* @experimental The start activity's `launchMode` in AndroidManifest.xml decides whether a
|
|
631
|
+
* second instance can exist at all: `singleTask` (the app template default) and
|
|
632
|
+
* `singleInstance` route the intent to the existing activity's `onNewIntent` instead of
|
|
633
|
+
* creating one. `singleInstancePerTask` (API 31+) keeps single-task behavior for launcher
|
|
634
|
+
* and deep-link starts while still allowing the `MULTIPLE_TASK`/`NEW_DOCUMENT` launch used
|
|
635
|
+
* here; `standard` also works. When the app is already in split-screen, the new window
|
|
636
|
+
* opens in the adjacent pane; otherwise it covers the current one and both show in recents.
|
|
637
|
+
*/
|
|
638
|
+
openWindow(options) {
|
|
639
|
+
warnMultiWindowIsExperimental();
|
|
640
|
+
const context = this.context ?? this.getNativeApplication();
|
|
641
|
+
const intent = new android.content.Intent();
|
|
642
|
+
const windowActivities = this._getWindows()
|
|
643
|
+
.filter((window) => window.state === 'attached' && !window._surfaceGone)
|
|
644
|
+
.map((window) => window.activity);
|
|
645
|
+
// startActivity/foregroundActivity can be third-party (SDK) activities, which must never be relaunched as a window.
|
|
646
|
+
const startActivity = [this.startActivity, this.foregroundActivity, ...windowActivities].find((activity) => activity && 'isNativeScriptActivity' in activity && !activity.isFinishing() && !activity.isDestroyed());
|
|
647
|
+
if (startActivity) {
|
|
648
|
+
intent.setClass(context, startActivity.getClass());
|
|
649
|
+
}
|
|
650
|
+
else {
|
|
651
|
+
const component = context.getPackageManager().getLaunchIntentForPackage(context.getPackageName())?.getComponent();
|
|
652
|
+
if (!component) {
|
|
653
|
+
throw new Error('Unable to open a window: no NativeScript activity or launch activity was found.');
|
|
654
|
+
}
|
|
655
|
+
intent.setComponent(component);
|
|
656
|
+
}
|
|
657
|
+
let flags = android.content.Intent.FLAG_ACTIVITY_NEW_TASK | android.content.Intent.FLAG_ACTIVITY_MULTIPLE_TASK | android.content.Intent.FLAG_ACTIVITY_NEW_DOCUMENT;
|
|
658
|
+
const launcher = this.foregroundActivity ?? startActivity;
|
|
659
|
+
if (SDK_VERSION >= 24 && launcher?.isInMultiWindowMode()) {
|
|
660
|
+
flags |= android.content.Intent.FLAG_ACTIVITY_LAUNCH_ADJACENT;
|
|
661
|
+
}
|
|
662
|
+
intent.setFlags(flags);
|
|
663
|
+
const data = options?.data;
|
|
664
|
+
if (data) {
|
|
665
|
+
for (const key of Object.keys(data)) {
|
|
666
|
+
intent.putExtra(key, dataSerialize(data[key], true));
|
|
667
|
+
}
|
|
668
|
+
}
|
|
669
|
+
if (launcher) {
|
|
670
|
+
launcher.startActivity(intent);
|
|
671
|
+
}
|
|
672
|
+
else {
|
|
673
|
+
context.startActivity(intent);
|
|
674
|
+
}
|
|
675
|
+
}
|
|
449
676
|
getRootView() {
|
|
450
677
|
const activity = this.startActivity;
|
|
451
678
|
if (!activity) {
|
|
@@ -469,9 +696,10 @@ export class AndroidApplication extends ApplicationCommon {
|
|
|
469
696
|
callbacks.resetActivityContent(activity);
|
|
470
697
|
}
|
|
471
698
|
getSystemAppearance() {
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
699
|
+
return this.getSystemAppearanceValue(this.getConfiguration());
|
|
700
|
+
}
|
|
701
|
+
getConfiguration() {
|
|
702
|
+
return (this.context ?? this.getNativeApplication()).getResources().getConfiguration();
|
|
475
703
|
}
|
|
476
704
|
// https://developer.android.com/guide/topics/ui/look-and-feel/darktheme#configuration_changes
|
|
477
705
|
getSystemAppearanceValue(configuration) {
|
|
@@ -485,9 +713,7 @@ export class AndroidApplication extends ApplicationCommon {
|
|
|
485
713
|
}
|
|
486
714
|
}
|
|
487
715
|
getLayoutDirection() {
|
|
488
|
-
|
|
489
|
-
const configuration = resources.getConfiguration();
|
|
490
|
-
return this.getLayoutDirectionValue(configuration);
|
|
716
|
+
return this.getLayoutDirectionValue(this.getConfiguration());
|
|
491
717
|
}
|
|
492
718
|
getLayoutDirectionValue(configuration) {
|
|
493
719
|
const layoutDirection = configuration.getLayoutDirection();
|
|
@@ -499,9 +725,7 @@ export class AndroidApplication extends ApplicationCommon {
|
|
|
499
725
|
}
|
|
500
726
|
}
|
|
501
727
|
getOrientation() {
|
|
502
|
-
|
|
503
|
-
const configuration = resources.getConfiguration();
|
|
504
|
-
return this.getOrientationValue(configuration);
|
|
728
|
+
return this.getOrientationValue(this.getConfiguration());
|
|
505
729
|
}
|
|
506
730
|
getOrientationValue(configuration) {
|
|
507
731
|
const orientation = configuration.orientation;
|
|
@@ -535,6 +759,7 @@ AndroidApplication.activityRequestPermissionsEvent = 'activityRequestPermissions
|
|
|
535
759
|
AndroidApplication.dialogOnCreateViewEvent = 'dialogOnCreateView';
|
|
536
760
|
AndroidApplication.configurationChangeEvent = 'configurationChange';
|
|
537
761
|
export * from './application-common';
|
|
762
|
+
export * from './application-interfaces';
|
|
538
763
|
export const Application = new AndroidApplication();
|
|
539
764
|
export const iOSApplication = undefined;
|
|
540
765
|
const applicationEvents = [Application.orientationChangedEvent, Application.systemAppearanceChangedEvent];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"application.android.js","sourceRoot":"","sources":["../../../../packages/core/application/application.android.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,mBAAmB,MAAM,yBAAyB,CAAC;AAC/D,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAGvC,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAEzD,OAAO,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAC;AACvE,OAAO,EAAE,4BAA4B,EAAE,uBAAuB,EAAE,4BAA4B,EAAE,uBAAuB,EAAE,MAAM,WAAW,CAAC;AACzI,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,WAAW,EAAE,cAAc,EAAE,gCAAgC,EAAE,eAAe,EAAE,YAAY,EAAE,WAAW,EAAE,0CAA0C,EAAE,MAAM,kBAAkB,CAAC;AACxN,OAAO,EAAE,sBAAsB,EAAE,MAAM,y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CAAC,CAAC;AAE5E,gCAAgC,CAAC,GAAG,EAAE;IACrC,OAAO;QACN,WAAW,EAAE,WAAW,CAAC,WAAW,EAAE;QACtC,gBAAgB,EAAE,WAAW,CAAC,gBAAgB,EAAE;KAChD,CAAC;AACH,CAAC,CAAC,CAAC;AAEH,SAAS,UAAU,CAAC,IAAI;IACvB,IAAI,eAAe,EAAE,EAAE,CAAC;QACvB,eAAe,EAAE,CAAC,UAAU,EAAE,CAAC;IAChC,CAAC;AACF,CAAC;AAED,sBAAsB,EAAE,CAAC,MAAM,CAAC,EAAE,CAAC,UAAU,EAAE,UAAU,CAAC,CAAC;AAE3D,sBAAsB,EAAE,CAAC,cAAc,CAAC,GAAG,EAAE;IAC5C,WAAW,CAAC,OAAO,CAAC,EAAE,CAAC,iBAAiB,EAAE,CAAC,IAAS,EAAE,EAAE;QACvD,IAAI,CAAC,eAAe,EAAE,EAAE,CAAC;YACxB,cAAc,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAC/B,CAAC;aAAM,CAAC;YACP,eAAe,EAAE,CAAC,SAAS,EAAE,CAAC;QAC/B,CAAC;IACF,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,sBAAsB,EAAE,CAAC,cAAc,CAAC,GAAG,EAAE;IAC5C,WAAW,CAAC,OAAO,CAAC,EAAE,CAAC,iBAAiB,EAAE,CAAC,IAAI,EAAE,EAAE;QAClD,IAAI,eAAe,EAAE,EAAE,CAAC;YACvB,eAAe,EAAE,CAAC,UAAU,EAAE,CAAC;QAChC,CAAC;IACF,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC,CAAC"}
|
|
1
|
+
{"version":3,"file":"application.android.js","sourceRoot":"","sources":["../../../../packages/core/application/application.android.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,mBAAmB,MAAM,yBAAyB,CAAC;AAC/D,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAE,OAAO,EAAE,MAAM,c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,IAAI,eAAe,EAAE,EAAE,CAAC;QACvB,eAAe,EAAE,CAAC,UAAU,EAAE,CAAC;IAChC,CAAC;AACF,CAAC;AAED,sBAAsB,EAAE,CAAC,MAAM,CAAC,EAAE,CAAC,UAAU,EAAE,UAAU,CAAC,CAAC;AAE3D,sBAAsB,EAAE,CAAC,cAAc,CAAC,GAAG,EAAE;IAC5C,WAAW,CAAC,OAAO,CAAC,EAAE,CAAC,iBAAiB,EAAE,CAAC,IAAS,EAAE,EAAE;QACvD,IAAI,CAAC,eAAe,EAAE,EAAE,CAAC;YACxB,cAAc,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAC/B,CAAC;aAAM,CAAC;YACP,eAAe,EAAE,CAAC,SAAS,EAAE,CAAC;QAC/B,CAAC;IACF,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,sBAAsB,EAAE,CAAC,cAAc,CAAC,GAAG,EAAE;IAC5C,WAAW,CAAC,OAAO,CAAC,EAAE,CAAC,iBAAiB,EAAE,CAAC,IAAI,EAAE,EAAE;QAClD,IAAI,eAAe,EAAE,EAAE,CAAC;YACvB,eAAe,EAAE,CAAC,UAAU,EAAE,CAAC;QAChC,CAAC;IACF,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC,CAAC","sourcesContent":["import * as ApplicationSettings from '../application-settings';\nimport { CoreTypes } from '../core-types';\nimport { profile } from '../profiling';\nimport type { View } from '../ui/core/view';\nimport { AndroidActivityCallbacks, NavigationEntry } from '../ui/frame/frame-common';\nimport { isEmbedded } from '../ui/embedding';\nimport { SDK_VERSION } from '../utils/constants';\nimport { dataSerialize } from '../utils';\nimport { ApplicationCommon } from './application-common';\nimport type { AndroidActivityBundleEventData, AndroidActivityEventData, AndroidConfigurationChangeEventData, ApplicationEventData } from './application-interfaces';\nimport type { AndroidApplication as IAndroidApplication } from './application';\nimport { Trace } from '../trace';\nimport { AndroidNativeWindow } from '../native-window/native-window.android';\nimport { NativeWindow } from '../native-window/native-window-common';\nimport { NativeWindowEvents } from '../native-window/native-window-interfaces';\nimport type { WindowOpenOptions } from '../native-window/native-window-interfaces';\nimport { fontScaleChanged } from '../accessibility/font-scale.android';\nimport { androidGetForegroundActivity, androidGetStartActivity, androidSetForegroundActivity, androidSetStartActivity } from './helpers';\nimport { getImageFetcher, getNativeApp, getRootView, initImageCache, setApplicationPropertiesCallback, setAppMainEntry, setNativeApp, setRootView, setToggleApplicationEventListenersCallback } from './helpers-common';\nimport { getNativeScriptGlobals } from '../globals/global-utils';\nimport lazy from '../utils/lazy';\n\ndeclare class NativeScriptLifecycleCallbacks extends android.app.Application.ActivityLifecycleCallbacks {}\n\nconst WINDOW_ID_EXTRA = 'com.tns.activity.windowId';\n\nlet multiWindowWarned = false;\n\nfunction warnMultiWindowIsExperimental(): void {\n\tif (multiWindowWarned) {\n\t\treturn;\n\t}\n\tmultiWindowWarned = true;\n\n\tconst message = 'Application.android.openWindow() is experimental. The start activity must not use launchMode=\"singleTask\" (the app template default) or \"singleInstance\" in AndroidManifest.xml, or Android hands the launch intent to the existing activity instead of opening a second one; use \"singleInstancePerTask\" (API 31+) or \"standard\".';\n\tTrace.write(message, Trace.categories.Debug, Trace.messageType.warn);\n\tconsole.warn(message);\n}\n\nlet NativeScriptLifecycleCallbacks_: typeof NativeScriptLifecycleCallbacks;\nfunction initNativeScriptLifecycleCallbacks() {\n\tif (NativeScriptLifecycleCallbacks_) {\n\t\treturn NativeScriptLifecycleCallbacks_;\n\t}\n\n\t@NativeClass\n\t@JavaProxy('org.nativescript.NativeScriptLifecycleCallbacks')\n\tclass NativeScriptLifecycleCallbacksImpl extends android.app.Application.ActivityLifecycleCallbacks {\n\t\tprivate activitiesCount: number;\n\t\tprivate nativescriptActivity: androidx.appcompat.app.AppCompatActivity;\n\n\t\t@profile\n\t\tpublic onActivityCreated(activity: androidx.appcompat.app.AppCompatActivity, savedInstanceState: android.os.Bundle): void {\n\t\t\t// console.log('NativeScriptLifecycleCallbacks onActivityCreated');\n\t\t\tthis.setThemeOnLaunch(activity);\n\n\t\t\tif (!Application.android.startActivity) {\n\t\t\t\tApplication.android.setStartActivity(activity);\n\t\t\t}\n\t\t\tif (!Application.android.foregroundActivity) {\n\t\t\t\tApplication.android.setForegroundActivity(activity);\n\t\t\t}\n\n\t\t\tif (!this.nativescriptActivity && 'isNativeScriptActivity' in activity) {\n\t\t\t\tthis.nativescriptActivity = activity;\n\t\t\t}\n\n\t\t\t// Create and register NativeWindow for this activity\n\t\t\tconst savedWindowId = savedInstanceState?.getString(WINDOW_ID_EXTRA);\n\t\t\tconst knownWindow = savedWindowId ? (Application.android.getWindowById(savedWindowId) as AndroidNativeWindow) : undefined;\n\t\t\tlet nativeWindow: AndroidNativeWindow;\n\n\t\t\tif (knownWindow?.state === 'detached') {\n\t\t\t\t// The activity was recreated (rotation, theme change): the same window\n\t\t\t\t// instance carries on, keeping its listeners and identity.\n\t\t\t\tknownWindow._reattach(activity);\n\t\t\t\tnativeWindow = knownWindow;\n\t\t\t} else {\n\t\t\t\tconst isPrimary = Application.android._getWindows().length === 0;\n\t\t\t\t// The role is fixed at creation because it is immutable, and deciding it later would\n\t\t\t\t// mean either a second window for this activity or a window with the wrong role.\n\t\t\t\tnativeWindow = new AndroidNativeWindow(activity, savedWindowId || AndroidNativeWindow.newWindowId(), isPrimary, isEmbedded() ? 'embedded' : 'application');\n\t\t\t\tApplication.android._registerWindow(nativeWindow);\n\t\t\t}\n\n\t\t\tnativeWindow._registerConfigurationCallbacks();\n\t\t\tnativeWindow._notifyEvent(NativeWindowEvents.attached);\n\n\t\t\tthis.notifyActivityCreated(activity, savedInstanceState, nativeWindow);\n\n\t\t\tif (Application.hasListeners(Application.displayedEvent)) {\n\t\t\t\tthis.subscribeForGlobalLayout(activity);\n\t\t\t}\n\t\t}\n\n\t\t@profile\n\t\tpublic onActivityDestroyed(activity: androidx.appcompat.app.AppCompatActivity): void {\n\t\t\t// console.log('NativeScriptLifecycleCallbacks onActivityDestroyed');\n\t\t\tif (activity === Application.android.foregroundActivity) {\n\t\t\t\tApplication.android.setForegroundActivity(undefined);\n\t\t\t}\n\n\t\t\tif (activity === this.nativescriptActivity) {\n\t\t\t\tthis.nativescriptActivity = undefined;\n\t\t\t}\n\n\t\t\tif (activity === Application.android.startActivity) {\n\t\t\t\tApplication.android.setStartActivity(undefined);\n\n\t\t\t\t// Fallback for start activity when it is destroyed but we have a known nativescript activity\n\t\t\t\tif (this.nativescriptActivity) {\n\t\t\t\t\tApplication.android.setStartActivity(this.nativescriptActivity);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tconst nativeWindow = Application.android._getWindowForActivity(activity);\n\t\t\tif (nativeWindow) {\n\t\t\t\t// Android always pauses before destroying, so the window has normally left the\n\t\t\t\t// active aggregate already; this only keeps a dropped pause from stranding it\n\t\t\t\t// there and wedging the app as never-suspended.\n\t\t\t\tApplication.android._setWindowActive(nativeWindow, false, activity);\n\n\t\t\t\tnativeWindow._surfaceGone = true;\n\n\t\t\t\t// A destroyed activity only ends the window session when it is finishing —\n\t\t\t\t// otherwise Android is recreating it and the same window is reused.\n\t\t\t\tconst isClosing = activity.isFinishing();\n\n\t\t\t\tif (isClosing) {\n\t\t\t\t\tnativeWindow._notifyEvent(NativeWindowEvents.close);\n\t\t\t\t}\n\n\t\t\t\t// Emit activityDestroyed on NativeWindow\n\t\t\t\tnativeWindow.notify({\n\t\t\t\t\teventName: NativeWindowEvents.activityDestroyed,\n\t\t\t\t\tobject: nativeWindow,\n\t\t\t\t\twindow: nativeWindow,\n\t\t\t\t\tactivity,\n\t\t\t\t} as AndroidActivityEventData);\n\n\t\t\t\tif (isClosing) {\n\t\t\t\t\tApplication.android._unregisterWindow(nativeWindow);\n\t\t\t\t} else {\n\t\t\t\t\tnativeWindow._detach();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tApplication.android.notify({\n\t\t\t\teventName: Application.android.activityDestroyedEvent,\n\t\t\t\tobject: Application.android,\n\t\t\t\twindow: nativeWindow,\n\t\t\t\tactivity,\n\t\t\t} as AndroidActivityEventData);\n\n\t\t\t// This callback runs for every activity in the process, not just NativeScript ones,\n\t\t\t// so an empty registry here means the app really has no window left.\n\t\t\tif (activity.isFinishing() && Application.android._getWindows().length === 0) {\n\t\t\t\tApplication.android.notify({\n\t\t\t\t\teventName: Application.exitEvent,\n\t\t\t\t\tobject: Application.android,\n\t\t\t\t\tandroid: activity,\n\t\t\t\t});\n\t\t\t}\n\n\t\t\t// TODO: This is a temporary workaround to force the V8's Garbage Collector, which will force the related Java Object to be collected.\n\t\t\tgc();\n\t\t}\n\n\t\t@profile\n\t\tpublic onActivityPaused(activity: androidx.appcompat.app.AppCompatActivity): void {\n\t\t\t// console.log('NativeScriptLifecycleCallbacks onActivityPaused');\n\t\t\tconst nativeWindow = Application.android._getWindowForActivity(activity);\n\n\t\t\t// `onActivityCreated` registers a window for every activity in the process, so the\n\t\t\t// window's role cannot tell a NativeScript activity from a third-party one.\n\t\t\tif ('isNativeScriptActivity' in activity) {\n\t\t\t\tApplication.android._setWindowActive(nativeWindow, false, activity);\n\t\t\t}\n\n\t\t\tif (nativeWindow) {\n\t\t\t\tnativeWindow._notifyEvent(NativeWindowEvents.deactivate);\n\t\t\t\t// Emit activityPaused on NativeWindow\n\t\t\t\tnativeWindow.notify({\n\t\t\t\t\teventName: NativeWindowEvents.activityPaused,\n\t\t\t\t\tobject: nativeWindow,\n\t\t\t\t\twindow: nativeWindow,\n\t\t\t\t\tactivity,\n\t\t\t\t} as AndroidActivityEventData);\n\t\t\t}\n\n\t\t\tApplication.android.notify({\n\t\t\t\teventName: Application.android.activityPausedEvent,\n\t\t\t\tobject: Application.android,\n\t\t\t\twindow: nativeWindow,\n\t\t\t\tactivity,\n\t\t\t} as AndroidActivityEventData);\n\t\t}\n\n\t\t@profile\n\t\tpublic onActivityResumed(activity: androidx.appcompat.app.AppCompatActivity): void {\n\t\t\t// console.log('NativeScriptLifecycleCallbacks onActivityResumed');\n\t\t\tApplication.android.setForegroundActivity(activity);\n\n\t\t\tconst nativeWindow = Application.android._getWindowForActivity(activity);\n\t\t\tif (nativeWindow) {\n\t\t\t\tnativeWindow._notifyEvent(NativeWindowEvents.activate);\n\t\t\t\t// Emit activityResumed on NativeWindow\n\t\t\t\tnativeWindow.notify({\n\t\t\t\t\teventName: NativeWindowEvents.activityResumed,\n\t\t\t\t\tobject: nativeWindow,\n\t\t\t\t\twindow: nativeWindow,\n\t\t\t\t\tactivity,\n\t\t\t\t} as AndroidActivityEventData);\n\t\t\t}\n\n\t\t\t// NOTE: setSuspended(false) is called in frame/index.android.ts inside onPostResume\n\t\t\t// This is done to ensure proper timing for the event to be raised\n\n\t\t\tApplication.android.notify({\n\t\t\t\teventName: Application.android.activityResumedEvent,\n\t\t\t\tobject: Application.android,\n\t\t\t\twindow: nativeWindow,\n\t\t\t\tactivity,\n\t\t\t} as AndroidActivityEventData);\n\t\t}\n\n\t\t@profile\n\t\tpublic onActivitySaveInstanceState(activity: androidx.appcompat.app.AppCompatActivity, bundle: android.os.Bundle): void {\n\t\t\t// console.log('NativeScriptLifecycleCallbacks onActivitySaveInstanceState');\n\n\t\t\t// Emit on NativeWindow first\n\t\t\tconst nativeWindow = Application.android._getWindowForActivity(activity);\n\t\t\tif (nativeWindow) {\n\t\t\t\t// Carries the window identity across activity recreation.\n\t\t\t\tbundle.putString(WINDOW_ID_EXTRA, nativeWindow.id);\n\n\t\t\t\tnativeWindow.notify({\n\t\t\t\t\teventName: NativeWindowEvents.saveActivityState,\n\t\t\t\t\tobject: nativeWindow,\n\t\t\t\t\twindow: nativeWindow,\n\t\t\t\t\tactivity,\n\t\t\t\t\tbundle,\n\t\t\t\t} as AndroidActivityBundleEventData);\n\t\t\t}\n\n\t\t\tApplication.android.notify({\n\t\t\t\teventName: Application.android.saveActivityStateEvent,\n\t\t\t\tobject: Application.android,\n\t\t\t\twindow: nativeWindow,\n\t\t\t\tactivity,\n\t\t\t\tbundle,\n\t\t\t} as AndroidActivityBundleEventData);\n\t\t}\n\n\t\t@profile\n\t\tpublic onActivityStarted(activity: androidx.appcompat.app.AppCompatActivity): void {\n\t\t\t// console.log('NativeScriptLifecycleCallbacks onActivityStarted');\n\n\t\t\tthis.activitiesCount = (this.activitiesCount ?? 0) + 1;\n\t\t\tif (this.activitiesCount === 1) {\n\t\t\t\tApplication.android.setInBackground(false, {\n\t\t\t\t\t// todo: deprecate event.android in favor of event.activity\n\t\t\t\t\tandroid: activity,\n\t\t\t\t\tactivity,\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tconst nativeWindow = Application.android._getWindowForActivity(activity);\n\t\t\tif (nativeWindow) {\n\t\t\t\tnativeWindow._notifyEvent(NativeWindowEvents.foreground);\n\t\t\t\t// Emit activityStarted on NativeWindow\n\t\t\t\tnativeWindow.notify({\n\t\t\t\t\teventName: NativeWindowEvents.activityStarted,\n\t\t\t\t\tobject: nativeWindow,\n\t\t\t\t\twindow: nativeWindow,\n\t\t\t\t\tactivity,\n\t\t\t\t} as AndroidActivityEventData);\n\t\t\t}\n\n\t\t\tApplication.android.notify({\n\t\t\t\teventName: Application.android.activityStartedEvent,\n\t\t\t\tobject: Application.android,\n\t\t\t\twindow: nativeWindow,\n\t\t\t\tactivity,\n\t\t\t} as AndroidActivityEventData);\n\t\t}\n\n\t\t@profile\n\t\tpublic onActivityStopped(activity: androidx.appcompat.app.AppCompatActivity): void {\n\t\t\t// console.log('NativeScriptLifecycleCallbacks onActivityStopped');\n\t\t\tthis.activitiesCount--;\n\t\t\tif (this.activitiesCount === 0) {\n\t\t\t\tApplication.android.setInBackground(true, {\n\t\t\t\t\t// todo: deprecate event.android in favor of event.activity\n\t\t\t\t\tandroid: activity,\n\t\t\t\t\tactivity,\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tconst nativeWindow = Application.android._getWindowForActivity(activity);\n\t\t\tif (nativeWindow) {\n\t\t\t\tnativeWindow._notifyEvent(NativeWindowEvents.background);\n\t\t\t\t// Emit activityStopped on NativeWindow\n\t\t\t\tnativeWindow.notify({\n\t\t\t\t\teventName: NativeWindowEvents.activityStopped,\n\t\t\t\t\tobject: nativeWindow,\n\t\t\t\t\twindow: nativeWindow,\n\t\t\t\t\tactivity,\n\t\t\t\t} as AndroidActivityEventData);\n\t\t\t}\n\n\t\t\tApplication.android.notify({\n\t\t\t\teventName: Application.android.activityStoppedEvent,\n\t\t\t\tobject: Application.android,\n\t\t\t\twindow: nativeWindow,\n\t\t\t\tactivity,\n\t\t\t} as AndroidActivityEventData);\n\t\t}\n\n\t\t@profile\n\t\tsetThemeOnLaunch(activity: androidx.appcompat.app.AppCompatActivity) {\n\t\t\t// Set app theme after launch screen was used during startup\n\t\t\tlet setThemeOnLaunch = ApplicationSettings.getNumber('SET_THEME_ON_LAUNCH', -1);\n\t\t\tif (setThemeOnLaunch === -1) {\n\t\t\t\tconst activityInfo = activity.getPackageManager().getActivityInfo(activity.getComponentName(), android.content.pm.PackageManager.GET_META_DATA);\n\t\t\t\tif (activityInfo.metaData) {\n\t\t\t\t\tsetThemeOnLaunch = activityInfo.metaData.getInt('SET_THEME_ON_LAUNCH', -1);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (setThemeOnLaunch !== -1) {\n\t\t\t\tactivity.setTheme(setThemeOnLaunch);\n\t\t\t}\n\t\t}\n\n\t\t@profile\n\t\tnotifyActivityCreated(activity: androidx.appcompat.app.AppCompatActivity, bundle: android.os.Bundle, nativeWindow?: NativeWindow) {\n\t\t\t// Emit on NativeWindow first\n\t\t\tif (nativeWindow) {\n\t\t\t\tnativeWindow.notify({\n\t\t\t\t\teventName: NativeWindowEvents.activityCreated,\n\t\t\t\t\tobject: nativeWindow,\n\t\t\t\t\twindow: nativeWindow,\n\t\t\t\t\tactivity,\n\t\t\t\t\tbundle,\n\t\t\t\t} as AndroidActivityBundleEventData);\n\t\t\t}\n\t\t\tApplication.android.notify({\n\t\t\t\teventName: Application.android.activityCreatedEvent,\n\t\t\t\tobject: Application.android,\n\t\t\t\twindow: nativeWindow,\n\t\t\t\tactivity,\n\t\t\t\tbundle,\n\t\t\t} as AndroidActivityBundleEventData);\n\t\t}\n\n\t\t@profile\n\t\tsubscribeForGlobalLayout(activity: androidx.appcompat.app.AppCompatActivity) {\n\t\t\tconst rootView = activity.getWindow().getDecorView().getRootView();\n\t\t\t// store the listener not to trigger GC collection before collecting the method\n\t\t\tglobal.onGlobalLayoutListener = new android.view.ViewTreeObserver.OnGlobalLayoutListener({\n\t\t\t\tonGlobalLayout() {\n\t\t\t\t\tApplication.android.notify({\n\t\t\t\t\t\teventName: Application.displayedEvent,\n\t\t\t\t\t\tobject: Application,\n\t\t\t\t\t\tandroid: Application.android,\n\t\t\t\t\t\tactivity,\n\t\t\t\t\t} as AndroidActivityEventData);\n\t\t\t\t\tconst viewTreeObserver = rootView.getViewTreeObserver();\n\t\t\t\t\tviewTreeObserver.removeOnGlobalLayoutListener(global.onGlobalLayoutListener);\n\t\t\t\t},\n\t\t\t});\n\t\t\trootView.getViewTreeObserver().addOnGlobalLayoutListener(global.onGlobalLayoutListener);\n\t\t}\n\t}\n\n\tNativeScriptLifecycleCallbacks_ = NativeScriptLifecycleCallbacksImpl;\n\treturn NativeScriptLifecycleCallbacks_;\n}\n\ndeclare class NativeScriptComponentCallbacks extends android.content.ComponentCallbacks2 {}\n\nlet NativeScriptComponentCallbacks_: typeof NativeScriptComponentCallbacks;\nfunction initNativeScriptComponentCallbacks() {\n\tif (NativeScriptComponentCallbacks_) {\n\t\treturn NativeScriptComponentCallbacks_;\n\t}\n\n\t@NativeClass\n\t@JavaProxy('org.nativescript.NativeScriptComponentCallbacks')\n\tclass NativeScriptComponentCallbacksImpl extends android.content.ComponentCallbacks2 {\n\t\t@profile\n\t\tpublic onLowMemory(): void {\n\t\t\tgc();\n\t\t\tjava.lang.System.gc();\n\n\t\t\tApplication.notify({\n\t\t\t\teventName: Application.lowMemoryEvent,\n\t\t\t\tobject: Application,\n\t\t\t\tandroid: this,\n\t\t\t} as ApplicationEventData);\n\t\t}\n\n\t\t@profile\n\t\tpublic onTrimMemory(level: number): void {\n\t\t\t// TODO: This is skipped for now, test carefully for OutOfMemory exceptions\n\t\t}\n\n\t\t@profile\n\t\tpublic onConfigurationChanged(newConfiguration: android.content.res.Configuration): void {\n\t\t\tApplication.android.onConfigurationChanged(newConfiguration);\n\t\t}\n\t}\n\n\tNativeScriptComponentCallbacks_ = NativeScriptComponentCallbacksImpl;\n\treturn NativeScriptComponentCallbacks_;\n}\n\ninterface RegisteredReceiverInfo {\n\treceiver: android.content.BroadcastReceiver;\n\tintent: string;\n\tcallback: (context: android.content.Context, intent: android.content.Intent) => void;\n\tid: number;\n\tflags: number;\n}\n\nconst BroadcastReceiver = lazy(() => {\n\t@NativeClass\n\tclass BroadcastReceiverImpl extends android.content.BroadcastReceiver {\n\t\tprivate _onReceiveCallback: (context: android.content.Context, intent: android.content.Intent) => void;\n\n\t\tconstructor(onReceiveCallback: (context: android.content.Context, intent: android.content.Intent) => void) {\n\t\t\tsuper();\n\t\t\tthis._onReceiveCallback = onReceiveCallback;\n\n\t\t\treturn global.__native(this);\n\t\t}\n\n\t\tpublic onReceive(context: android.content.Context, intent: android.content.Intent) {\n\t\t\tif (this._onReceiveCallback) {\n\t\t\t\tthis._onReceiveCallback(context, intent);\n\t\t\t}\n\t\t}\n\t}\n\treturn BroadcastReceiverImpl;\n});\n\nexport class AndroidApplication extends ApplicationCommon {\n\tstatic readonly fragmentCreateEvent = 'fragmentCreate';\n\tstatic readonly activityCreateEvent = 'activityCreate';\n\tstatic readonly activityCreatedEvent = 'activityCreated';\n\tstatic readonly activityDestroyedEvent = 'activityDestroyed';\n\tstatic readonly activityStartedEvent = 'activityStarted';\n\tstatic readonly activityPausedEvent = 'activityPaused';\n\tstatic readonly activityResumedEvent = 'activityResumed';\n\tstatic readonly activityStoppedEvent = 'activityStopped';\n\tstatic readonly saveActivityStateEvent = 'saveActivityState';\n\tstatic readonly activityResultEvent = 'activityResult';\n\tstatic readonly activityBackPressedEvent = 'activityBackPressed';\n\tstatic readonly activityNewIntentEvent = 'activityNewIntent';\n\tstatic readonly activityRequestPermissionsEvent = 'activityRequestPermissions';\n\tstatic readonly dialogOnCreateViewEvent = 'dialogOnCreateView';\n\tstatic readonly configurationChangeEvent = 'configurationChange';\n\n\treadonly fragmentCreateEvent = AndroidApplication.fragmentCreateEvent;\n\treadonly activityCreateEvent = AndroidApplication.activityCreateEvent;\n\treadonly activityCreatedEvent = AndroidApplication.activityCreatedEvent;\n\treadonly activityDestroyedEvent = AndroidApplication.activityDestroyedEvent;\n\treadonly activityStartedEvent = AndroidApplication.activityStartedEvent;\n\treadonly activityPausedEvent = AndroidApplication.activityPausedEvent;\n\treadonly activityResumedEvent = AndroidApplication.activityResumedEvent;\n\treadonly activityStoppedEvent = AndroidApplication.activityStoppedEvent;\n\treadonly saveActivityStateEvent = AndroidApplication.saveActivityStateEvent;\n\treadonly activityResultEvent = AndroidApplication.activityResultEvent;\n\treadonly activityBackPressedEvent = AndroidApplication.activityBackPressedEvent;\n\treadonly activityNewIntentEvent = AndroidApplication.activityNewIntentEvent;\n\treadonly activityRequestPermissionsEvent = AndroidApplication.activityRequestPermissionsEvent;\n\treadonly dialogOnCreateViewEvent = AndroidApplication.activityRequestPermissionsEvent;\n\treadonly configurationChangeEvent = AndroidApplication.activityRequestPermissionsEvent;\n\t// `on` is created in ApplicationCommon as a bound function property. We only re-declare it\n\t// here so Android-specific events get typed callbacks without changing the runtime field.\n\tdeclare on: IAndroidApplication['on'];\n\n\tprivate _nativeApp: android.app.Application;\n\tprivate _context: android.content.Context;\n\tprivate _packageName: string;\n\n\t// we are using these property to store the callbacks to avoid early GC collection which would trigger MarkReachableObjects\n\tprivate lifecycleCallbacks: NativeScriptLifecycleCallbacks;\n\tprivate componentCallbacks: NativeScriptComponentCallbacks;\n\n\t// Windows currently active. Membership, not a count, so a repeated or missing lifecycle\n\t// callback cannot drift the aggregate. The registry owns window lifetime, so nothing here\n\t// outlives the window itself.\n\tprivate _activeWindows = new Set<NativeWindow>();\n\n\tinit(nativeApp: android.app.Application): void {\n\t\tif (!nativeApp || this.nativeApp === nativeApp) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (this.nativeApp) {\n\t\t\tthrow new Error('Application.android already initialized.');\n\t\t}\n\n\t\ttry {\n\t\t\tthis._nativeApp = nativeApp;\n\t\t\tsetNativeApp(nativeApp);\n\t\t\tthis._context = nativeApp.getApplicationContext();\n\t\t\tthis._prevConfiguration = new android.content.res.Configuration(this._context.getResources().getConfiguration());\n\t\t\tthis._packageName = nativeApp.getPackageName();\n\n\t\t\t// we store those callbacks and add a function for clearing them later so that the objects will be eligable for GC\n\t\t\tthis.lifecycleCallbacks = new (initNativeScriptLifecycleCallbacks())();\n\t\t\tthis.nativeApp.registerActivityLifecycleCallbacks(this.lifecycleCallbacks);\n\n\t\t\tthis.componentCallbacks = new (initNativeScriptComponentCallbacks())();\n\t\t\tthis.nativeApp.registerComponentCallbacks(this.componentCallbacks);\n\n\t\t\tthis._registerPendingReceivers();\n\t\t} catch (err) {\n\t\t\tconsole.error('Error initializing AndroidApplication', err, err.stack);\n\t\t}\n\t}\n\tprivate _registeredReceivers: Record<string, RegisteredReceiverInfo[]> = {};\n\tprivate _registeredReceiversById: Record<number, RegisteredReceiverInfo> = {};\n\tprivate _nextReceiverId: number = 1;\n\tprivate _pendingReceiverRegistrations: Omit<RegisteredReceiverInfo, 'receiver'>[] = [];\n\tprivate _registerPendingReceivers() {\n\t\tthis._pendingReceiverRegistrations.forEach((info) => this._registerReceiver(this.context, info.intent, info.callback, info.flags, info.id));\n\t\tthis._pendingReceiverRegistrations.length = 0;\n\t}\n\tprivate _prevConfiguration: android.content.res.Configuration;\n\tonConfigurationChanged(configuration: android.content.res.Configuration): void {\n\t\tconst diff = configuration.diff(this._prevConfiguration);\n\n\t\t// The application context reports the app-wide configuration, which a window on a\n\t\t// second display or in split-screen does not necessarily share, so the primary\n\t\t// window is asked first. Each window tracks its own through its activity.\n\t\tconst primaryWindow = this.primaryWindow;\n\n\t\tif ((diff & 128) /* ActivityInfo.CONFIG_ORIENTATION */ !== 0) {\n\t\t\tconst nativeApp = Application.android.getNativeApplication();\n\t\t\tconst screenOrientation = (nativeApp.getSystemService(android.content.Context.WINDOW_SERVICE) as android.view.WindowManager).getDefaultDisplay().getRotation();\n\t\t\tlet degrees = 0;\n\t\t\tswitch (screenOrientation) {\n\t\t\t\tcase 1 /* android.view.Surface.ROTATION_90 */:\n\t\t\t\t\tdegrees = 90;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2 /* android.view.Surface.ROTATION_180 */:\n\t\t\t\t\tdegrees = 180;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3 /* android.view.Surface.ROTATION_270 */:\n\t\t\t\t\tdegrees = 270;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\tthis.setOrientation(primaryWindow?.orientation() ?? this.getOrientationValue(configuration), degrees);\n\t\t}\n\t\tif ((diff & 512) /* ActivityInfo.CONFIG_UI_MODE */ !== 0) {\n\t\t\tthis.setSystemAppearance(primaryWindow?.systemAppearance() ?? this.getSystemAppearanceValue(configuration));\n\t\t}\n\t\tif ((diff & 1073741824) /* ActivityInfo.CONFIG_FONT_SCALE */ !== 0) {\n\t\t\tfontScaleChanged(Number(configuration.fontScale));\n\t\t}\n\t\tif ((diff & 8192) /* ActivityInfo.CONFIG_LAYOUT_DIRECTION */ !== 0) {\n\t\t\tthis.setLayoutDirection(primaryWindow?.layoutDirection() ?? this.getLayoutDirectionValue(configuration));\n\t\t}\n\t\tthis.notify(<AndroidConfigurationChangeEventData>{ eventName: this.configurationChangeEvent, configuration, diff });\n\t\tthis._prevConfiguration = new android.content.res.Configuration(configuration);\n\t}\n\n\tgetNativeApplication() {\n\t\tlet nativeApp = this.nativeApp;\n\n\t\tif (nativeApp) {\n\t\t\treturn nativeApp;\n\t\t}\n\n\t\tnativeApp = getNativeApp<android.app.Application>();\n\n\t\t// we cannot work without having the app instance\n\t\tif (!nativeApp) {\n\t\t\tthrow new Error(\"Failed to retrieve native Android Application object. If you have a custom android.app.Application type implemented make sure that you've called the 'Application.android.init' method.\");\n\t\t}\n\n\t\treturn nativeApp;\n\t}\n\n\tget nativeApp(): android.app.Application {\n\t\treturn this._nativeApp;\n\t}\n\n\trun(entry?: string | NavigationEntry): void {\n\t\tif (this.started) {\n\t\t\tthrow new Error('Application is already started.');\n\t\t}\n\n\t\tthis.started = true;\n\t\tsetAppMainEntry(typeof entry === 'string' ? { moduleName: entry } : entry);\n\n\t\tif (!this.nativeApp) {\n\t\t\tconst nativeApp = this.getNativeApplication();\n\t\t\tthis.init(nativeApp);\n\t\t}\n\n\t\t// The activity lifecycle callbacks are registered but no activity has been created yet,\n\t\t// so this always precedes the first `windowOpen`.\n\t\tthis.notifyReady();\n\t}\n\n\tget startActivity() {\n\t\treturn androidGetStartActivity();\n\t}\n\n\tget foregroundActivity() {\n\t\treturn androidGetForegroundActivity();\n\t}\n\n\tsetStartActivity(value: androidx.appcompat.app.AppCompatActivity) {\n\t\tandroidSetStartActivity(value);\n\t}\n\n\tsetForegroundActivity(value: androidx.appcompat.app.AppCompatActivity) {\n\t\tandroidSetForegroundActivity(value);\n\t}\n\n\tget paused(): boolean {\n\t\treturn this.suspended;\n\t}\n\n\tget backgrounded(): boolean {\n\t\treturn this.inBackground;\n\t}\n\n\tget context() {\n\t\treturn this._context;\n\t}\n\n\tget packageName() {\n\t\treturn this._packageName;\n\t}\n\n\t// Possible flags are:\n\t// RECEIVER_EXPORTED (2)\n\t// RECEIVER_NOT_EXPORTED (4)\n\t// RECEIVER_VISIBLE_TO_INSTANT_APPS (1)\n\tpublic registerBroadcastReceiver(intentFilter: string, onReceiveCallback: (context: android.content.Context, intent: android.content.Intent) => void, flags = 2): () => void {\n\t\tconst receiverId = this._nextReceiverId++;\n\t\tif (this.context) {\n\t\t\tthis._registerReceiver(this.context, intentFilter, onReceiveCallback, flags, receiverId);\n\t\t} else {\n\t\t\tthis._pendingReceiverRegistrations.push({\n\t\t\t\tintent: intentFilter,\n\t\t\t\tcallback: onReceiveCallback,\n\t\t\t\tid: receiverId,\n\t\t\t\tflags,\n\t\t\t});\n\t\t}\n\t\tlet removed = false;\n\t\treturn () => {\n\t\t\tif (removed) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tremoved = true;\n\t\t\tif (this._registeredReceiversById[receiverId]) {\n\t\t\t\tconst receiverInfo = this._registeredReceiversById[receiverId];\n\t\t\t\tthis.context.unregisterReceiver(receiverInfo.receiver);\n\t\t\t\tthis._registeredReceivers[receiverInfo.intent] = this._registeredReceivers[receiverInfo.intent]?.filter((ri) => ri.id !== receiverId);\n\t\t\t\tdelete this._registeredReceiversById[receiverId];\n\t\t\t} else {\n\t\t\t\tthis._pendingReceiverRegistrations = this._pendingReceiverRegistrations.filter((ri) => ri.id !== receiverId);\n\t\t\t}\n\t\t};\n\t}\n\tprivate _registerReceiver(context: android.content.Context, intentFilter: string, onReceiveCallback: (context: android.content.Context, intent: android.content.Intent) => void, flags: number, id: number): android.content.BroadcastReceiver {\n\t\tconst receiver: android.content.BroadcastReceiver = new (BroadcastReceiver())(onReceiveCallback);\n\t\tif (SDK_VERSION >= 26) {\n\t\t\tcontext.registerReceiver(receiver, new android.content.IntentFilter(intentFilter), flags);\n\t\t} else {\n\t\t\tcontext.registerReceiver(receiver, new android.content.IntentFilter(intentFilter));\n\t\t}\n\t\tconst receiverInfo: RegisteredReceiverInfo = { receiver, intent: intentFilter, callback: onReceiveCallback, id: typeof id === 'number' ? id : this._nextReceiverId++, flags };\n\t\tthis._registeredReceivers[intentFilter] ??= [];\n\t\tthis._registeredReceivers[intentFilter].push(receiverInfo);\n\t\tthis._registeredReceiversById[receiverInfo.id] = receiverInfo;\n\t\treturn receiver;\n\t}\n\n\tpublic unregisterBroadcastReceiver(intentFilter: string): void {\n\t\tconst receivers = this._registeredReceivers[intentFilter];\n\t\tif (receivers) {\n\t\t\treceivers.forEach((receiver) => {\n\t\t\t\tthis.context.unregisterReceiver(receiver.receiver);\n\t\t\t});\n\t\t\tthis._registeredReceivers[intentFilter] = [];\n\t\t}\n\t}\n\n\tpublic getRegisteredBroadcastReceiver(intentFilter: string): android.content.BroadcastReceiver | undefined {\n\t\treturn this._registeredReceivers[intentFilter]?.[0]?.receiver;\n\t}\n\n\tpublic getRegisteredBroadcastReceivers(intentFilter: string): android.content.BroadcastReceiver[] {\n\t\tconst receiversInfo = this._registeredReceivers[intentFilter];\n\t\tif (receiversInfo) {\n\t\t\treturn receiversInfo.map((info) => info.receiver);\n\t\t}\n\t\treturn [];\n\t}\n\n\t// --- NativeWindow registry ---\n\n\t/**\n\t * @internal - Get a NativeWindow by its activity.\n\t */\n\t_getWindowForActivity(activity: androidx.appcompat.app.AppCompatActivity): AndroidNativeWindow | undefined {\n\t\treturn this._windows.find((nw) => nw.android?.activity === activity) as AndroidNativeWindow | undefined;\n\t}\n\n\t/**\n\t * @internal - Feeds a window's active state into the application-level 'resume'/'suspend'\n\t * events, which describe the app as a whole: they are raised when the first window becomes\n\t * active and when the last active one resigns. Callers decide which activities may speak\n\t * for the app; every window reaching here participates.\n\t */\n\t_setWindowActive(nativeWindow: NativeWindow | undefined, active: boolean, activity?: androidx.appcompat.app.AppCompatActivity): void {\n\t\tif (this._trackWindowActive(nativeWindow, active)) {\n\t\t\tthis.setSuspended(!active, {\n\t\t\t\t// todo: deprecate event.android in favor of event.activity\n\t\t\t\tandroid: activity,\n\t\t\t\tactivity,\n\t\t\t});\n\t\t}\n\t}\n\n\t/**\n\t * @returns whether the set flipped between empty and non-empty, which is the only point\n\t * at which app-level state changes.\n\t */\n\tprivate _trackWindowActive(nativeWindow: NativeWindow | undefined, active: boolean): boolean {\n\t\tconst wasPopulated = this._activeWindows.size > 0;\n\n\t\t// An activity with no registered window cannot join the aggregate, so it only speaks\n\t\t// for the app while no window holds the state.\n\t\tif (!nativeWindow) {\n\t\t\treturn !wasPopulated;\n\t\t}\n\n\t\tif (active) {\n\t\t\tthis._activeWindows.add(nativeWindow);\n\t\t} else {\n\t\t\tthis._activeWindows.delete(nativeWindow);\n\t\t}\n\n\t\treturn wasPopulated !== this._activeWindows.size > 0;\n\t}\n\n\t// --- Multi-window support ---\n\n\t/**\n\t * Opens a new window by launching the start activity into its own task.\n\t *\n\t * @param options Options for the new window. `options.data` is put on the launch\n\t * intent as extras and surfaces as the window's `data`.\n\t *\n\t * @experimental The start activity's `launchMode` in AndroidManifest.xml decides whether a\n\t * second instance can exist at all: `singleTask` (the app template default) and\n\t * `singleInstance` route the intent to the existing activity's `onNewIntent` instead of\n\t * creating one. `singleInstancePerTask` (API 31+) keeps single-task behavior for launcher\n\t * and deep-link starts while still allowing the `MULTIPLE_TASK`/`NEW_DOCUMENT` launch used\n\t * here; `standard` also works. When the app is already in split-screen, the new window\n\t * opens in the adjacent pane; otherwise it covers the current one and both show in recents.\n\t */\n\topenWindow(options?: WindowOpenOptions): void {\n\t\twarnMultiWindowIsExperimental();\n\n\t\tconst context = this.context ?? this.getNativeApplication();\n\t\tconst intent = new android.content.Intent();\n\t\tconst windowActivities = this._getWindows()\n\t\t\t.filter((window) => window.state === 'attached' && !window._surfaceGone)\n\t\t\t.map((window) => (window as AndroidNativeWindow).activity);\n\t\t// startActivity/foregroundActivity can be third-party (SDK) activities, which must never be relaunched as a window.\n\t\tconst startActivity = [this.startActivity, this.foregroundActivity, ...windowActivities].find((activity) => activity && 'isNativeScriptActivity' in activity && !activity.isFinishing() && !activity.isDestroyed());\n\n\t\tif (startActivity) {\n\t\t\tintent.setClass(context, startActivity.getClass());\n\t\t} else {\n\t\t\tconst component = context.getPackageManager().getLaunchIntentForPackage(context.getPackageName())?.getComponent();\n\t\t\tif (!component) {\n\t\t\t\tthrow new Error('Unable to open a window: no NativeScript activity or launch activity was found.');\n\t\t\t}\n\t\t\tintent.setComponent(component);\n\t\t}\n\n\t\tlet flags = android.content.Intent.FLAG_ACTIVITY_NEW_TASK | android.content.Intent.FLAG_ACTIVITY_MULTIPLE_TASK | android.content.Intent.FLAG_ACTIVITY_NEW_DOCUMENT;\n\n\t\tconst launcher = this.foregroundActivity ?? startActivity;\n\t\tif (SDK_VERSION >= 24 && launcher?.isInMultiWindowMode()) {\n\t\t\tflags |= android.content.Intent.FLAG_ACTIVITY_LAUNCH_ADJACENT;\n\t\t}\n\t\tintent.setFlags(flags);\n\n\t\tconst data = options?.data;\n\t\tif (data) {\n\t\t\tfor (const key of Object.keys(data)) {\n\t\t\t\tintent.putExtra(key, dataSerialize(data[key], true));\n\t\t\t}\n\t\t}\n\n\t\tif (launcher) {\n\t\t\tlauncher.startActivity(intent);\n\t\t} else {\n\t\t\tcontext.startActivity(intent);\n\t\t}\n\t}\n\n\tgetRootView(): View {\n\t\tconst activity = this.startActivity;\n\t\tif (!activity) {\n\t\t\treturn undefined;\n\t\t}\n\t\tconst callbacks: AndroidActivityCallbacks = activity['_callbacks'];\n\n\t\tsetRootView(callbacks ? callbacks.getRootView() : undefined);\n\t\treturn getRootView();\n\t}\n\n\tresetRootView(entry?: NavigationEntry | string): void {\n\t\tsuper.resetRootView(entry);\n\n\t\tconst activity = this.startActivity;\n\t\tif (!activity) {\n\t\t\tthrow new Error('Cannot find android activity.');\n\t\t}\n\n\t\t// this.mainEntry = typeof entry === 'string' ? { moduleName: entry } : entry;\n\t\tconst callbacks: AndroidActivityCallbacks = activity['_callbacks'];\n\t\tif (!callbacks) {\n\t\t\tthrow new Error('Cannot find android activity callbacks.');\n\t\t}\n\t\tcallbacks.resetActivityContent(activity);\n\t}\n\n\tgetSystemAppearance(): 'light' | 'dark' {\n\t\treturn this.getSystemAppearanceValue(this.getConfiguration());\n\t}\n\n\tprivate getConfiguration(): android.content.res.Configuration {\n\t\treturn (this.context ?? this.getNativeApplication()).getResources().getConfiguration();\n\t}\n\n\t// https://developer.android.com/guide/topics/ui/look-and-feel/darktheme#configuration_changes\n\tprivate getSystemAppearanceValue(configuration: android.content.res.Configuration): 'dark' | 'light' {\n\t\tconst systemAppearance = configuration.uiMode & android.content.res.Configuration.UI_MODE_NIGHT_MASK;\n\n\t\tswitch (systemAppearance) {\n\t\t\tcase android.content.res.Configuration.UI_MODE_NIGHT_YES:\n\t\t\t\treturn 'dark';\n\t\t\tcase android.content.res.Configuration.UI_MODE_NIGHT_NO:\n\t\t\tcase android.content.res.Configuration.UI_MODE_NIGHT_UNDEFINED:\n\t\t\t\treturn 'light';\n\t\t}\n\t}\n\n\tgetLayoutDirection(): CoreTypes.LayoutDirectionType {\n\t\treturn this.getLayoutDirectionValue(this.getConfiguration());\n\t}\n\n\tprivate getLayoutDirectionValue(configuration: android.content.res.Configuration): CoreTypes.LayoutDirectionType {\n\t\tconst layoutDirection = configuration.getLayoutDirection();\n\n\t\tswitch (layoutDirection) {\n\t\t\tcase android.view.View.LAYOUT_DIRECTION_LTR:\n\t\t\t\treturn CoreTypes.LayoutDirection.ltr;\n\t\t\tcase android.view.View.LAYOUT_DIRECTION_RTL:\n\t\t\t\treturn CoreTypes.LayoutDirection.rtl;\n\t\t}\n\t}\n\n\tgetOrientation() {\n\t\treturn this.getOrientationValue(this.getConfiguration());\n\t}\n\n\tprivate getOrientationValue(configuration: android.content.res.Configuration): 'portrait' | 'landscape' | 'unknown' {\n\t\tconst orientation = configuration.orientation;\n\n\t\tswitch (orientation) {\n\t\t\tcase android.content.res.Configuration.ORIENTATION_LANDSCAPE:\n\t\t\t\treturn 'landscape';\n\t\t\tcase android.content.res.Configuration.ORIENTATION_PORTRAIT:\n\t\t\t\treturn 'portrait';\n\t\t\tdefault:\n\t\t\t\treturn 'unknown';\n\t\t}\n\t}\n\n\tget android() {\n\t\t// ensures Application.android is defined when running on Android\n\t\treturn this;\n\t}\n}\n\nexport * from './application-common';\nexport * from './application-interfaces';\nexport const Application = new AndroidApplication();\nexport const iOSApplication = undefined;\n\nconst applicationEvents: string[] = [Application.orientationChangedEvent, Application.systemAppearanceChangedEvent];\nfunction toggleApplicationEventListeners(toAdd: boolean, callback: (args: ApplicationEventData) => void) {\n\tfor (const eventName of applicationEvents) {\n\t\tif (toAdd) {\n\t\t\tApplication.on(eventName, callback);\n\t\t} else {\n\t\t\tApplication.off(eventName, callback);\n\t\t}\n\t}\n}\nsetToggleApplicationEventListenersCallback(toggleApplicationEventListeners);\n\nsetApplicationPropertiesCallback(() => {\n\treturn {\n\t\torientation: Application.orientation(),\n\t\tsystemAppearance: Application.systemAppearance(),\n\t};\n});\n\nfunction onLiveSync(args): void {\n\tif (getImageFetcher()) {\n\t\tgetImageFetcher().clearCache();\n\t}\n}\n\ngetNativeScriptGlobals().events.on('livesync', onLiveSync);\n\ngetNativeScriptGlobals().addEventWiring(() => {\n\tApplication.android.on('activityStarted', (args: any) => {\n\t\tif (!getImageFetcher()) {\n\t\t\tinitImageCache(args.activity);\n\t\t} else {\n\t\t\tgetImageFetcher().initCache();\n\t\t}\n\t});\n});\n\ngetNativeScriptGlobals().addEventWiring(() => {\n\tApplication.android.on('activityStopped', (args) => {\n\t\tif (getImageFetcher()) {\n\t\t\tgetImageFetcher().closeCache();\n\t\t}\n\t});\n});\n"]}
|