@akylas/nativescript 9.0.25 → 9.1.5

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.
Files changed (633) hide show
  1. package/abortcontroller/abortsignal.js.map +1 -1
  2. package/abortcontroller/index.js.map +1 -1
  3. package/accessibility/accessibility-common.js.map +1 -1
  4. package/accessibility/accessibility-css-helper.js.map +1 -1
  5. package/accessibility/accessibility-properties.js.map +1 -1
  6. package/accessibility/accessibility-service-common.js.map +1 -1
  7. package/accessibility/accessibility-service.android.js.map +1 -1
  8. package/accessibility/accessibility-service.ios.js.map +1 -1
  9. package/accessibility/accessibility-types.js.map +1 -1
  10. package/accessibility/font-scale-common.js.map +1 -1
  11. package/accessibility/font-scale.android.js.map +1 -1
  12. package/accessibility/font-scale.ios.js.map +1 -1
  13. package/accessibility/index.android.js.map +1 -1
  14. package/accessibility/index.ios.js.map +1 -1
  15. package/animation-frame/animation-native.android.js.map +1 -1
  16. package/animation-frame/animation-native.ios.js.map +1 -1
  17. package/animation-frame/index.js.map +1 -1
  18. package/application/application-common.d.ts +205 -3
  19. package/application/application-common.js +438 -55
  20. package/application/application-common.js.map +1 -1
  21. package/application/application-interfaces.d.ts +67 -1
  22. package/application/application-interfaces.js.map +1 -1
  23. package/application/application-shims.js.map +1 -1
  24. package/application/application.android.d.ts +39 -0
  25. package/application/application.android.js +239 -18
  26. package/application/application.android.js.map +1 -1
  27. package/application/application.d.ts +161 -54
  28. package/application/application.ios.d.ts +189 -28
  29. package/application/application.ios.js +892 -390
  30. package/application/application.ios.js.map +1 -1
  31. package/application/helpers-common.d.ts +7 -0
  32. package/application/helpers-common.js +46 -1
  33. package/application/helpers-common.js.map +1 -1
  34. package/application/helpers.android.js.map +1 -1
  35. package/application/helpers.ios.js.map +1 -1
  36. package/application/index.android.js.map +1 -1
  37. package/application/index.ios.js.map +1 -1
  38. package/application/scene-delegate-bridge.d.ts +60 -0
  39. package/application/scene-delegate-bridge.js +138 -0
  40. package/application/scene-delegate-bridge.js.map +1 -0
  41. package/application-settings/application-settings-common.js.map +1 -1
  42. package/application-settings/index.android.js.map +1 -1
  43. package/application-settings/index.ios.js.map +1 -1
  44. package/bundle-entry-points.js.map +1 -1
  45. package/cli-hooks/before-checkForChanges.mjs +0 -11
  46. package/color/color-common.js +16 -5
  47. package/color/color-common.js.map +1 -1
  48. package/color/color-types.js.map +1 -1
  49. package/color/color-utils.d.ts +4 -1
  50. package/color/color-utils.js +14 -9
  51. package/color/color-utils.js.map +1 -1
  52. package/color/index.android.js.map +1 -1
  53. package/color/index.ios.js.map +1 -1
  54. package/color/known-colors.js.map +1 -1
  55. package/config/config.interface.d.ts +45 -3
  56. package/config/config.interface.js.map +1 -1
  57. package/config/index.js.map +1 -1
  58. package/connectivity/index.android.js.map +1 -1
  59. package/connectivity/index.ios.js.map +1 -1
  60. package/console/index.js.map +1 -1
  61. package/core-types/animation-types.js.map +1 -1
  62. package/core-types/index.d.ts +25 -2
  63. package/core-types/index.js +23 -0
  64. package/core-types/index.js.map +1 -1
  65. package/core-types/validators.js.map +1 -1
  66. package/css/CSS3Parser.js +3 -2
  67. package/css/CSS3Parser.js.map +1 -1
  68. package/css/CSSNativeScript.js.map +1 -1
  69. package/css/css-tree-parser.js +5 -1
  70. package/css/css-tree-parser.js.map +1 -1
  71. package/css/lib/parse/index.js +5 -1
  72. package/css/lib/parse/index.js.map +1 -1
  73. package/css/parser.js +20 -3
  74. package/css/parser.js.map +1 -1
  75. package/css/reworkcss.js.map +1 -1
  76. package/css/system-classes.d.ts +9 -0
  77. package/css/system-classes.js +23 -0
  78. package/css/system-classes.js.map +1 -1
  79. package/css-mediaquery/index.d.ts +6 -1
  80. package/css-mediaquery/index.js +35 -6
  81. package/css-mediaquery/index.js.map +1 -1
  82. package/css-value/reworkcss-value.js.map +1 -1
  83. package/data/observable/index.d.ts +23 -0
  84. package/data/observable/index.js +50 -9
  85. package/data/observable/index.js.map +1 -1
  86. package/data/observable-array/index.js.map +1 -1
  87. package/data/virtual-array/index.js.map +1 -1
  88. package/debugger/InspectorBackendCommands.js.map +1 -1
  89. package/debugger/devtools-elements-interfaces.js.map +1 -1
  90. package/debugger/devtools-elements.common.js.map +1 -1
  91. package/debugger/devtools-elements.js.map +1 -1
  92. package/debugger/dom-types.js +31 -1
  93. package/debugger/dom-types.js.map +1 -1
  94. package/debugger/index.js.map +1 -1
  95. package/debugger/webinspector-css.js.map +1 -1
  96. package/debugger/webinspector-dom.js.map +1 -1
  97. package/debugger/webinspector-network.android.js.map +1 -1
  98. package/debugger/webinspector-network.d.ts +29 -0
  99. package/debugger/webinspector-network.ios.js.map +1 -1
  100. package/fetch/index.d.ts +79 -0
  101. package/fetch/index.js +408 -0
  102. package/fetch/index.js.map +1 -0
  103. package/file-system/file-system-access.android.d.ts +1 -0
  104. package/file-system/file-system-access.android.js +18 -21
  105. package/file-system/file-system-access.android.js.map +1 -1
  106. package/file-system/file-system-access.ios.js +21 -13
  107. package/file-system/file-system-access.ios.js.map +1 -1
  108. package/file-system/index.d.ts +3 -3
  109. package/file-system/index.js.map +1 -1
  110. package/fps-meter/fps-native.android.js.map +1 -1
  111. package/fps-meter/fps-native.ios.js.map +1 -1
  112. package/fps-meter/index.js.map +1 -1
  113. package/global-types.d.ts +40 -34
  114. package/globals/global-utils.d.ts +6 -1
  115. package/globals/global-utils.js +10 -5
  116. package/globals/global-utils.js.map +1 -1
  117. package/globals/index.js +22 -9
  118. package/globals/index.js.map +1 -1
  119. package/globals/polyfills/polyfill-xhr.js.map +1 -1
  120. package/globals/polyfills/utils.js +2 -0
  121. package/globals/polyfills/utils.js.map +1 -1
  122. package/http/http-interfaces.js.map +1 -1
  123. package/http/http-request/http-request-common.js.map +1 -1
  124. package/http/http-request/index.android.js +5 -1
  125. package/http/http-request/index.android.js.map +1 -1
  126. package/http/http-request/index.ios.js.map +1 -1
  127. package/http/http-request-internal/http-request-internal-common.d.ts +6 -1
  128. package/http/http-request-internal/http-request-internal-common.js +19 -0
  129. package/http/http-request-internal/http-request-internal-common.js.map +1 -1
  130. package/http/http-request-internal/index.android.d.ts +7 -1
  131. package/http/http-request-internal/index.android.js +8 -6
  132. package/http/http-request-internal/index.android.js.map +1 -1
  133. package/http/http-request-internal/index.ios.d.ts +7 -1
  134. package/http/http-request-internal/index.ios.js +34 -17
  135. package/http/http-request-internal/index.ios.js.map +1 -1
  136. package/http/index.js.map +1 -1
  137. package/image-asset/image-asset-common.js.map +1 -1
  138. package/image-asset/index.android.js.map +1 -1
  139. package/image-asset/index.ios.js.map +1 -1
  140. package/image-source/image-source-common.js.map +1 -1
  141. package/image-source/index.android.js.map +1 -1
  142. package/image-source/index.ios.js +7 -6
  143. package/image-source/index.ios.js.map +1 -1
  144. package/index.d.ts +3 -1
  145. package/index.js +1 -0
  146. package/index.js.map +1 -1
  147. package/inspector_modules.js +1 -1
  148. package/inspector_modules.js.map +1 -1
  149. package/js-libs/easysax/easysax.d.ts +49 -7
  150. package/js-libs/easysax/easysax.js +631 -747
  151. package/js-libs/easysax/easysax.js.map +1 -0
  152. package/matrix/index.js.map +1 -1
  153. package/media-query-list/index.js +57 -15
  154. package/media-query-list/index.js.map +1 -1
  155. package/module-name-resolver/helpers.d.ts +1 -1
  156. package/module-name-resolver/helpers.js.map +1 -1
  157. package/module-name-resolver/index.d.ts +2 -2
  158. package/module-name-resolver/index.js.map +1 -1
  159. package/module-name-resolver/non-bundle-workflow-compat.js.map +1 -1
  160. package/module-name-resolver/qualifier-matcher/index.js.map +1 -1
  161. package/native-window/index.d.ts +426 -0
  162. package/native-window/index.js +4 -0
  163. package/native-window/index.js.map +1 -0
  164. package/native-window/native-window-common.d.ts +153 -0
  165. package/native-window/native-window-common.js +340 -0
  166. package/native-window/native-window-common.js.map +1 -0
  167. package/native-window/native-window-interfaces.d.ts +186 -0
  168. package/native-window/native-window-interfaces.js +90 -0
  169. package/native-window/native-window-interfaces.js.map +1 -0
  170. package/native-window/native-window.android.d.ts +59 -0
  171. package/native-window/native-window.android.js +175 -0
  172. package/native-window/native-window.android.js.map +1 -0
  173. package/native-window/native-window.ios.d.ts +61 -0
  174. package/native-window/native-window.ios.js +218 -0
  175. package/native-window/native-window.ios.js.map +1 -0
  176. package/native-window/window-base.d.ts +111 -0
  177. package/native-window/window-base.js +91 -0
  178. package/native-window/window-base.js.map +1 -0
  179. package/package.json +3 -3
  180. package/platform/common.js.map +1 -1
  181. package/platform/device/index.android.js.map +1 -1
  182. package/platform/device/index.ios.js.map +1 -1
  183. package/platform/index.js.map +1 -1
  184. package/platform/screen/index.android.js.map +1 -1
  185. package/platform/screen/index.ios.d.ts +1 -0
  186. package/platform/screen/index.ios.js +6 -2
  187. package/platform/screen/index.ios.js.map +1 -1
  188. package/platforms/android/java/org/nativescript/widgets/BorderDrawable.java +5 -6
  189. package/platforms/android/java/org/nativescript/widgets/BoxShadowDrawable.java +0 -6
  190. package/platforms/android/java/org/nativescript/widgets/CommonLayoutParams.java +56 -0
  191. package/platforms/android/java/org/nativescript/widgets/ContentLayout.java +20 -4
  192. package/platforms/android/java/org/nativescript/widgets/CustomTransition.java +26 -9
  193. package/platforms/android/java/org/nativescript/widgets/FlexLine.java +3 -3
  194. package/platforms/android/java/org/nativescript/widgets/FlexboxLayout.java +194 -731
  195. package/platforms/android/java/org/nativescript/widgets/ImageView.java +2 -2
  196. package/platforms/android/java/org/nativescript/widgets/Utils.java +37 -9
  197. package/platforms/android/java/org/nativescript/widgets/ViewHelper.java +78 -0
  198. package/platforms/android/java/org/nativescript/widgets/image/BitmapOwner.java +1 -4
  199. package/platforms/android/java/org/nativescript/widgets/image/Worker.java +99 -76
  200. package/platforms/android/native-api-usage.json +11 -0
  201. package/platforms/ios/src/NativeScriptMainWindow.swift +72 -39
  202. package/profiling/index.js.map +1 -1
  203. package/references.d.ts +5 -2
  204. package/text/formatted-string.js.map +1 -1
  205. package/text/index.android.js.map +1 -1
  206. package/text/index.ios.js.map +1 -1
  207. package/text/span.js.map +1 -1
  208. package/text/text-common.js +1 -1
  209. package/text/text-common.js.map +1 -1
  210. package/timer/index.android.js +2 -1
  211. package/timer/index.android.js.map +1 -1
  212. package/timer/index.ios.js.map +1 -1
  213. package/trace/index.d.ts +2 -2
  214. package/trace/index.js.map +1 -1
  215. package/ui/action-bar/action-bar-common.js.map +1 -1
  216. package/ui/action-bar/index.android.js +7 -11
  217. package/ui/action-bar/index.android.js.map +1 -1
  218. package/ui/action-bar/index.d.ts +13 -1
  219. package/ui/action-bar/index.ios.js +26 -0
  220. package/ui/action-bar/index.ios.js.map +1 -1
  221. package/ui/activity-indicator/activity-indicator-common.js.map +1 -1
  222. package/ui/activity-indicator/index.android.js.map +1 -1
  223. package/ui/activity-indicator/index.ios.js.map +1 -1
  224. package/ui/animation/animation-common.js.map +1 -1
  225. package/ui/animation/animation-interfaces.js.map +1 -1
  226. package/ui/animation/animation-shared.js.map +1 -1
  227. package/ui/animation/animation-types.js.map +1 -1
  228. package/ui/animation/index.android.js.map +1 -1
  229. package/ui/animation/index.ios.js +6 -1
  230. package/ui/animation/index.ios.js.map +1 -1
  231. package/ui/animation/keyframe-animation.d.ts +3 -1
  232. package/ui/animation/keyframe-animation.js +72 -3
  233. package/ui/animation/keyframe-animation.js.map +1 -1
  234. package/ui/builder/binding-builder.d.ts +8 -0
  235. package/ui/builder/binding-builder.js +12 -0
  236. package/ui/builder/binding-builder.js.map +1 -1
  237. package/ui/builder/component-builder/index.d.ts +7 -4
  238. package/ui/builder/component-builder/index.js +13 -7
  239. package/ui/builder/component-builder/index.js.map +1 -1
  240. package/ui/builder/index.d.ts +16 -2
  241. package/ui/builder/index.js +61 -13
  242. package/ui/builder/index.js.map +1 -1
  243. package/ui/button/button-common.js.map +1 -1
  244. package/ui/button/index.android.js +4 -3
  245. package/ui/button/index.android.js.map +1 -1
  246. package/ui/button/index.ios.js.map +1 -1
  247. package/ui/content-view/index.js +2 -0
  248. package/ui/content-view/index.js.map +1 -1
  249. package/ui/core/bindable/bindable-expressions.js.map +1 -1
  250. package/ui/core/bindable/bindable-resources.js.map +1 -1
  251. package/ui/core/bindable/bindable-types.d.ts +15 -0
  252. package/ui/core/bindable/bindable-types.js.map +1 -1
  253. package/ui/core/bindable/index.d.ts +1 -1
  254. package/ui/core/bindable/index.js +14 -8
  255. package/ui/core/bindable/index.js.map +1 -1
  256. package/ui/core/control-state-change/index.android.js.map +1 -1
  257. package/ui/core/control-state-change/index.ios.js.map +1 -1
  258. package/ui/core/properties/index.d.ts +37 -2
  259. package/ui/core/properties/index.js +205 -29
  260. package/ui/core/properties/index.js.map +1 -1
  261. package/ui/core/properties/property-shared.js +11 -2
  262. package/ui/core/properties/property-shared.js.map +1 -1
  263. package/ui/core/view/index.android.d.ts +5 -0
  264. package/ui/core/view/index.android.js +89 -15
  265. package/ui/core/view/index.android.js.map +1 -1
  266. package/ui/core/view/index.d.ts +58 -1
  267. package/ui/core/view/index.ios.d.ts +1 -0
  268. package/ui/core/view/index.ios.js +48 -11
  269. package/ui/core/view/index.ios.js.map +1 -1
  270. package/ui/core/view/view-common.d.ts +37 -0
  271. package/ui/core/view/view-common.js +81 -0
  272. package/ui/core/view/view-common.js.map +1 -1
  273. package/ui/core/view/view-helper/index.android.d.ts +1 -0
  274. package/ui/core/view/view-helper/index.android.js +8 -0
  275. package/ui/core/view/view-helper/index.android.js.map +1 -1
  276. package/ui/core/view/view-helper/index.d.ts +46 -0
  277. package/ui/core/view/view-helper/index.ios.d.ts +42 -0
  278. package/ui/core/view/view-helper/index.ios.js +170 -5
  279. package/ui/core/view/view-helper/index.ios.js.map +1 -1
  280. package/ui/core/view/view-helper/view-helper-common.js +21 -3
  281. package/ui/core/view/view-helper/view-helper-common.js.map +1 -1
  282. package/ui/core/view/view-helper/view-helper-shared.js.map +1 -1
  283. package/ui/core/view/view-interfaces.js.map +1 -1
  284. package/ui/core/view-base/index.js +75 -36
  285. package/ui/core/view-base/index.js.map +1 -1
  286. package/ui/core/view-base/utils.js.map +1 -1
  287. package/ui/core/weak-event-listener/index.js.map +1 -1
  288. package/ui/date-picker/date-picker-common.js.map +1 -1
  289. package/ui/date-picker/index.android.js +1 -1
  290. package/ui/date-picker/index.android.js.map +1 -1
  291. package/ui/date-picker/index.ios.js.map +1 -1
  292. package/ui/dialogs/dialogs-common.js.map +1 -1
  293. package/ui/dialogs/index.android.js +5 -5
  294. package/ui/dialogs/index.android.js.map +1 -1
  295. package/ui/dialogs/index.ios.js.map +1 -1
  296. package/ui/editable-text-base/editable-text-base-common.js.map +1 -1
  297. package/ui/editable-text-base/index.android.d.ts +2 -0
  298. package/ui/editable-text-base/index.android.js +17 -7
  299. package/ui/editable-text-base/index.android.js.map +1 -1
  300. package/ui/editable-text-base/index.d.ts +8 -0
  301. package/ui/editable-text-base/index.ios.js.map +1 -1
  302. package/ui/embedding/index.android.js.map +1 -1
  303. package/ui/embedding/index.ios.js.map +1 -1
  304. package/ui/enums/enums.js.map +1 -1
  305. package/ui/enums/index.js.map +1 -1
  306. package/ui/frame/activity.android.js.map +1 -1
  307. package/ui/frame/fragment.android.js.map +1 -1
  308. package/ui/frame/fragment.ios.js.map +1 -1
  309. package/ui/frame/fragment.transitions.android.d.ts +12 -9
  310. package/ui/frame/fragment.transitions.android.js +105 -90
  311. package/ui/frame/fragment.transitions.android.js.map +1 -1
  312. package/ui/frame/fragment.transitions.types.js.map +1 -1
  313. package/ui/frame/frame-common.d.ts +14 -2
  314. package/ui/frame/frame-common.js +51 -24
  315. package/ui/frame/frame-common.js.map +1 -1
  316. package/ui/frame/frame-constants.d.ts +9 -0
  317. package/ui/frame/frame-constants.js +10 -0
  318. package/ui/frame/frame-constants.js.map +1 -0
  319. package/ui/frame/frame-helper-for-android.d.ts +2 -2
  320. package/ui/frame/frame-helper-for-android.js +14 -5
  321. package/ui/frame/frame-helper-for-android.js.map +1 -1
  322. package/ui/frame/frame-helpers.js.map +1 -1
  323. package/ui/frame/frame-interfaces.d.ts +1 -1
  324. package/ui/frame/frame-interfaces.js.map +1 -1
  325. package/ui/frame/frame-stack.d.ts +22 -1
  326. package/ui/frame/frame-stack.js +43 -5
  327. package/ui/frame/frame-stack.js.map +1 -1
  328. package/ui/frame/index.android.d.ts +2 -2
  329. package/ui/frame/index.android.js +161 -56
  330. package/ui/frame/index.android.js.map +1 -1
  331. package/ui/frame/index.d.ts +15 -5
  332. package/ui/frame/index.ios.d.ts +1 -1
  333. package/ui/frame/index.ios.js +86 -26
  334. package/ui/frame/index.ios.js.map +1 -1
  335. package/ui/gestures/gestures-common.js.map +1 -1
  336. package/ui/gestures/gestures-types.d.ts +2 -0
  337. package/ui/gestures/gestures-types.js.map +1 -1
  338. package/ui/gestures/index.android.d.ts +1 -1
  339. package/ui/gestures/index.android.js +177 -133
  340. package/ui/gestures/index.android.js.map +1 -1
  341. package/ui/gestures/index.ios.js +36 -7
  342. package/ui/gestures/index.ios.js.map +1 -1
  343. package/ui/gestures/touch-manager.d.ts +1 -2
  344. package/ui/gestures/touch-manager.js +79 -50
  345. package/ui/gestures/touch-manager.js.map +1 -1
  346. package/ui/html-view/html-view-common.js.map +1 -1
  347. package/ui/html-view/index.android.js.map +1 -1
  348. package/ui/html-view/index.ios.js.map +1 -1
  349. package/ui/image/image-common.js +1 -1
  350. package/ui/image/image-common.js.map +1 -1
  351. package/ui/image/index.android.js +14 -2
  352. package/ui/image/index.android.js.map +1 -1
  353. package/ui/image/index.ios.js.map +1 -1
  354. package/ui/image/symbol-effects-common.js.map +1 -1
  355. package/ui/image/symbol-effects.android.js.map +1 -1
  356. package/ui/image/symbol-effects.ios.js.map +1 -1
  357. package/ui/image-cache/image-cache-common.js.map +1 -1
  358. package/ui/image-cache/index.android.js +1 -2
  359. package/ui/image-cache/index.android.js.map +1 -1
  360. package/ui/image-cache/index.ios.js.map +1 -1
  361. package/ui/index.d.ts +2 -2
  362. package/ui/index.js.map +1 -1
  363. package/ui/label/index.android.js.map +1 -1
  364. package/ui/label/index.ios.js.map +1 -1
  365. package/ui/layouts/absolute-layout/absolute-layout-common.js.map +1 -1
  366. package/ui/layouts/absolute-layout/index.android.js.map +1 -1
  367. package/ui/layouts/absolute-layout/index.ios.js +3 -0
  368. package/ui/layouts/absolute-layout/index.ios.js.map +1 -1
  369. package/ui/layouts/dock-layout/dock-layout-common.js.map +1 -1
  370. package/ui/layouts/dock-layout/index.android.js.map +1 -1
  371. package/ui/layouts/dock-layout/index.ios.js +3 -0
  372. package/ui/layouts/dock-layout/index.ios.js.map +1 -1
  373. package/ui/layouts/flexbox-layout/flexbox-layout-common.d.ts +7 -0
  374. package/ui/layouts/flexbox-layout/flexbox-layout-common.js +18 -0
  375. package/ui/layouts/flexbox-layout/flexbox-layout-common.js.map +1 -1
  376. package/ui/layouts/flexbox-layout/index.android.d.ts +5 -0
  377. package/ui/layouts/flexbox-layout/index.android.js +15 -0
  378. package/ui/layouts/flexbox-layout/index.android.js.map +1 -1
  379. package/ui/layouts/flexbox-layout/index.d.ts +19 -1
  380. package/ui/layouts/flexbox-layout/index.ios.d.ts +2 -0
  381. package/ui/layouts/flexbox-layout/index.ios.js +246 -195
  382. package/ui/layouts/flexbox-layout/index.ios.js.map +1 -1
  383. package/ui/layouts/grid-layout/grid-layout-common.js.map +1 -1
  384. package/ui/layouts/grid-layout/index.android.js.map +1 -1
  385. package/ui/layouts/grid-layout/index.ios.js +3 -0
  386. package/ui/layouts/grid-layout/index.ios.js.map +1 -1
  387. package/ui/layouts/index.js.map +1 -1
  388. package/ui/layouts/layout-base-common.d.ts +1 -0
  389. package/ui/layouts/layout-base-common.js +23 -1
  390. package/ui/layouts/layout-base-common.js.map +1 -1
  391. package/ui/layouts/layout-base.android.js.map +1 -1
  392. package/ui/layouts/layout-base.ios.js.map +1 -1
  393. package/ui/layouts/liquid-glass/index.android.js.map +1 -1
  394. package/ui/layouts/liquid-glass/index.ios.d.ts +0 -1
  395. package/ui/layouts/liquid-glass/index.ios.js +2 -43
  396. package/ui/layouts/liquid-glass/index.ios.js.map +1 -1
  397. package/ui/layouts/liquid-glass/liquid-glass-common.js.map +1 -1
  398. package/ui/layouts/liquid-glass-container/index.android.js.map +1 -1
  399. package/ui/layouts/liquid-glass-container/index.ios.d.ts +0 -1
  400. package/ui/layouts/liquid-glass-container/index.ios.js +2 -43
  401. package/ui/layouts/liquid-glass-container/index.ios.js.map +1 -1
  402. package/ui/layouts/liquid-glass-container/liquid-glass-container-common.js.map +1 -1
  403. package/ui/layouts/root-layout/index.android.js.map +1 -1
  404. package/ui/layouts/root-layout/index.ios.js.map +1 -1
  405. package/ui/layouts/root-layout/root-layout-common.js.map +1 -1
  406. package/ui/layouts/root-layout/root-layout-stack.js.map +1 -1
  407. package/ui/layouts/stack-layout/index.android.js.map +1 -1
  408. package/ui/layouts/stack-layout/index.ios.js +3 -0
  409. package/ui/layouts/stack-layout/index.ios.js.map +1 -1
  410. package/ui/layouts/stack-layout/stack-layout-common.js.map +1 -1
  411. package/ui/layouts/wrap-layout/index.android.js.map +1 -1
  412. package/ui/layouts/wrap-layout/index.ios.js +3 -0
  413. package/ui/layouts/wrap-layout/index.ios.js.map +1 -1
  414. package/ui/layouts/wrap-layout/wrap-layout-common.js.map +1 -1
  415. package/ui/list-picker/index.android.d.ts +1 -0
  416. package/ui/list-picker/index.android.js +6 -5
  417. package/ui/list-picker/index.android.js.map +1 -1
  418. package/ui/list-picker/index.ios.js.map +1 -1
  419. package/ui/list-picker/list-picker-common.js.map +1 -1
  420. package/ui/list-view/index.android.js +19 -11
  421. package/ui/list-view/index.android.js.map +1 -1
  422. package/ui/list-view/index.d.ts +47 -3
  423. package/ui/list-view/index.ios.d.ts +13 -3
  424. package/ui/list-view/index.ios.js +132 -41
  425. package/ui/list-view/index.ios.js.map +1 -1
  426. package/ui/list-view/list-view-common.d.ts +19 -0
  427. package/ui/list-view/list-view-common.js +30 -0
  428. package/ui/list-view/list-view-common.js.map +1 -1
  429. package/ui/page/events.js.map +1 -1
  430. package/ui/page/index.android.js.map +1 -1
  431. package/ui/page/index.d.ts +1 -1
  432. package/ui/page/index.ios.d.ts +3 -1
  433. package/ui/page/index.ios.js +33 -20
  434. package/ui/page/index.ios.js.map +1 -1
  435. package/ui/page/page-common.d.ts +5 -1
  436. package/ui/page/page-common.js.map +1 -1
  437. package/ui/placeholder/index.android.js.map +1 -1
  438. package/ui/placeholder/index.js.map +1 -1
  439. package/ui/placeholder/placeholder-common.js.map +1 -1
  440. package/ui/progress/index.android.js.map +1 -1
  441. package/ui/progress/index.ios.js.map +1 -1
  442. package/ui/progress/progress-common.js.map +1 -1
  443. package/ui/proxy-view-container/index.js.map +1 -1
  444. package/ui/repeater/index.d.ts +2 -1
  445. package/ui/repeater/index.js.map +1 -1
  446. package/ui/scroll-view/index.android.d.ts +2 -1
  447. package/ui/scroll-view/index.android.js +4 -1
  448. package/ui/scroll-view/index.android.js.map +1 -1
  449. package/ui/scroll-view/index.d.ts +53 -0
  450. package/ui/scroll-view/index.ios.d.ts +13 -1
  451. package/ui/scroll-view/index.ios.js +100 -20
  452. package/ui/scroll-view/index.ios.js.map +1 -1
  453. package/ui/scroll-view/scroll-view-common.d.ts +13 -0
  454. package/ui/scroll-view/scroll-view-common.js +27 -0
  455. package/ui/scroll-view/scroll-view-common.js.map +1 -1
  456. package/ui/search-bar/index.android.js +2 -2
  457. package/ui/search-bar/index.android.js.map +1 -1
  458. package/ui/search-bar/index.ios.js.map +1 -1
  459. package/ui/search-bar/search-bar-common.js.map +1 -1
  460. package/ui/segmented-bar/index.android.js +8 -8
  461. package/ui/segmented-bar/index.android.js.map +1 -1
  462. package/ui/segmented-bar/index.ios.js.map +1 -1
  463. package/ui/segmented-bar/segmented-bar-common.d.ts +5 -1
  464. package/ui/segmented-bar/segmented-bar-common.js +6 -1
  465. package/ui/segmented-bar/segmented-bar-common.js.map +1 -1
  466. package/ui/slider/index.android.js +1 -2
  467. package/ui/slider/index.android.js.map +1 -1
  468. package/ui/slider/index.ios.js.map +1 -1
  469. package/ui/slider/slider-common.js.map +1 -1
  470. package/ui/split-view/index.android.js.map +1 -1
  471. package/ui/split-view/index.ios.js.map +1 -1
  472. package/ui/split-view/split-view-common.js.map +1 -1
  473. package/ui/styling/background-common.d.ts +2 -0
  474. package/ui/styling/background-common.js +10 -2
  475. package/ui/styling/background-common.js.map +1 -1
  476. package/ui/styling/background.android.d.ts +4 -1
  477. package/ui/styling/background.android.js +5 -2
  478. package/ui/styling/background.android.js.map +1 -1
  479. package/ui/styling/background.d.ts +2 -2
  480. package/ui/styling/background.ios.d.ts +1 -1
  481. package/ui/styling/background.ios.js +10 -3
  482. package/ui/styling/background.ios.js.map +1 -1
  483. package/ui/styling/box-shadow.js.map +1 -1
  484. package/ui/styling/clip-path-function.js.map +1 -1
  485. package/ui/styling/converters.js.map +1 -1
  486. package/ui/styling/css-animation-parser.js.map +1 -1
  487. package/ui/styling/css-selector.d.ts +60 -13
  488. package/ui/styling/css-selector.js +311 -50
  489. package/ui/styling/css-selector.js.map +1 -1
  490. package/ui/styling/css-shadow.js.map +1 -1
  491. package/ui/styling/css-stroke.js.map +1 -1
  492. package/ui/styling/css-transform.js.map +1 -1
  493. package/ui/styling/css-utils.d.ts +16 -0
  494. package/ui/styling/css-utils.js +121 -7
  495. package/ui/styling/css-utils.js.map +1 -1
  496. package/ui/styling/font-common.js.map +1 -1
  497. package/ui/styling/font-interfaces.js.map +1 -1
  498. package/ui/styling/font.android.js.map +1 -1
  499. package/ui/styling/font.ios.js.map +1 -1
  500. package/ui/styling/length-shared.d.ts +2 -0
  501. package/ui/styling/length-shared.js +29 -2
  502. package/ui/styling/length-shared.js.map +1 -1
  503. package/ui/styling/linear-gradient.js.map +1 -1
  504. package/ui/styling/style/index.d.ts +29 -2
  505. package/ui/styling/style/index.js +1 -0
  506. package/ui/styling/style/index.js.map +1 -1
  507. package/ui/styling/style-properties.d.ts +5 -0
  508. package/ui/styling/style-properties.js +172 -101
  509. package/ui/styling/style-properties.js.map +1 -1
  510. package/ui/styling/style-scope.d.ts +24 -3
  511. package/ui/styling/style-scope.js +461 -63
  512. package/ui/styling/style-scope.js.map +1 -1
  513. package/ui/styling/styling-profile.js.map +1 -1
  514. package/ui/styling/styling-shared.js.map +1 -1
  515. package/ui/switch/index.android.js +1 -1
  516. package/ui/switch/index.android.js.map +1 -1
  517. package/ui/switch/index.ios.js +5 -1
  518. package/ui/switch/index.ios.js.map +1 -1
  519. package/ui/switch/switch-common.js.map +1 -1
  520. package/ui/tab-view/index.android.js +13 -17
  521. package/ui/tab-view/index.android.js.map +1 -1
  522. package/ui/tab-view/index.d.ts +5 -3
  523. package/ui/tab-view/index.ios.d.ts +2 -1
  524. package/ui/tab-view/index.ios.js +83 -20
  525. package/ui/tab-view/index.ios.js.map +1 -1
  526. package/ui/tab-view/tab-view-common.d.ts +6 -1
  527. package/ui/tab-view/tab-view-common.js +17 -1
  528. package/ui/tab-view/tab-view-common.js.map +1 -1
  529. package/ui/text-base/formatted-string.js.map +1 -1
  530. package/ui/text-base/index.android.js +6 -9
  531. package/ui/text-base/index.android.js.map +1 -1
  532. package/ui/text-base/index.ios.d.ts +3 -0
  533. package/ui/text-base/index.ios.js +26 -4
  534. package/ui/text-base/index.ios.js.map +1 -1
  535. package/ui/text-base/span.js.map +1 -1
  536. package/ui/text-base/text-base-common.js.map +1 -1
  537. package/ui/text-field/index.android.js.map +1 -1
  538. package/ui/text-field/index.ios.js +13 -5
  539. package/ui/text-field/index.ios.js.map +1 -1
  540. package/ui/text-field/text-field-common.js.map +1 -1
  541. package/ui/text-view/index.android.js.map +1 -1
  542. package/ui/text-view/index.ios.js.map +1 -1
  543. package/ui/text-view/text-view-common.js.map +1 -1
  544. package/ui/time-picker/index.android.js +1 -1
  545. package/ui/time-picker/index.android.js.map +1 -1
  546. package/ui/time-picker/index.ios.js.map +1 -1
  547. package/ui/time-picker/time-picker-common.js.map +1 -1
  548. package/ui/transition/fade-transition.android.js.map +1 -1
  549. package/ui/transition/fade-transition.ios.js.map +1 -1
  550. package/ui/transition/flip-transition.android.js.map +1 -1
  551. package/ui/transition/index.android.js.map +1 -1
  552. package/ui/transition/index.d.ts +2 -1
  553. package/ui/transition/index.ios.js.map +1 -1
  554. package/ui/transition/modal-transition.android.js.map +1 -1
  555. package/ui/transition/modal-transition.ios.js +33 -5
  556. package/ui/transition/modal-transition.ios.js.map +1 -1
  557. package/ui/transition/page-transition.android.d.ts +4 -0
  558. package/ui/transition/page-transition.android.js +171 -86
  559. package/ui/transition/page-transition.android.js.map +1 -1
  560. package/ui/transition/page-transition.ios.d.ts +5 -0
  561. package/ui/transition/page-transition.ios.js +298 -36
  562. package/ui/transition/page-transition.ios.js.map +1 -1
  563. package/ui/transition/shared-transition-helper.android.d.ts +3 -0
  564. package/ui/transition/shared-transition-helper.android.js +9 -0
  565. package/ui/transition/shared-transition-helper.android.js.map +1 -1
  566. package/ui/transition/shared-transition-helper.d.ts +7 -0
  567. package/ui/transition/shared-transition-helper.ios.d.ts +48 -0
  568. package/ui/transition/shared-transition-helper.ios.js +977 -95
  569. package/ui/transition/shared-transition-helper.ios.js.map +1 -1
  570. package/ui/transition/shared-transition.d.ts +134 -0
  571. package/ui/transition/shared-transition.js +90 -2
  572. package/ui/transition/shared-transition.js.map +1 -1
  573. package/ui/transition/slide-transition.android.js.map +1 -1
  574. package/ui/transition/slide-transition.ios.js.map +1 -1
  575. package/ui/utils.android.js.map +1 -1
  576. package/ui/utils.d.ts +2 -0
  577. package/ui/utils.ios.js.map +1 -1
  578. package/ui/web-view/index.android.js +1 -1
  579. package/ui/web-view/index.android.js.map +1 -1
  580. package/ui/web-view/index.ios.js.map +1 -1
  581. package/ui/web-view/web-view-common.js.map +1 -1
  582. package/ui/web-view/web-view-interfaces.js.map +1 -1
  583. package/utils/android-runtime-version.d.ts +12 -0
  584. package/utils/android-runtime-version.js +36 -0
  585. package/utils/android-runtime-version.js.map +1 -0
  586. package/utils/animation-helpers.js.map +1 -1
  587. package/utils/common.js.map +1 -1
  588. package/utils/constants.android.js.map +1 -1
  589. package/utils/constants.ios.js.map +1 -1
  590. package/utils/debug-source.js.map +1 -1
  591. package/utils/debug.js.map +1 -1
  592. package/utils/index.android.js.map +1 -1
  593. package/utils/index.ios.js.map +1 -1
  594. package/utils/layout-helper/index.android.js.map +1 -1
  595. package/utils/layout-helper/index.ios.js +11 -3
  596. package/utils/layout-helper/index.ios.js.map +1 -1
  597. package/utils/layout-helper/layout-helper-common.js.map +1 -1
  598. package/utils/layout-helper/layout-helper-shared.js.map +1 -1
  599. package/utils/lazy.js.map +1 -1
  600. package/utils/macrotask-scheduler.js.map +1 -1
  601. package/utils/mainthread-helper.android.js.map +1 -1
  602. package/utils/mainthread-helper.ios.js.map +1 -1
  603. package/utils/module-merge.js.map +1 -1
  604. package/utils/native-helper-for-android.js +9 -3
  605. package/utils/native-helper-for-android.js.map +1 -1
  606. package/utils/native-helper.android.d.ts +66 -2
  607. package/utils/native-helper.android.js.map +1 -1
  608. package/utils/native-helper.d.ts +2 -2
  609. package/utils/native-helper.ios.d.ts +52 -2
  610. package/utils/native-helper.ios.js +35 -5
  611. package/utils/native-helper.ios.js.map +1 -1
  612. package/utils/native-helper.types.d.ts +2 -0
  613. package/utils/number-utils.js.map +1 -1
  614. package/utils/platform-check.d.ts +1 -1
  615. package/utils/platform-check.js.map +1 -1
  616. package/utils/shared.js.map +1 -1
  617. package/utils/types.js.map +1 -1
  618. package/utils/utils-shared.js.map +1 -1
  619. package/wgc/atob.js.map +1 -1
  620. package/wgc/btoa.js.map +1 -1
  621. package/wgc/crypto/SubtleCrypto.js.map +1 -1
  622. package/wgc/crypto/index.d.ts +1 -1
  623. package/wgc/crypto/index.js +12 -8
  624. package/wgc/crypto/index.js.map +1 -1
  625. package/wgc/index.js.map +1 -1
  626. package/xhr/index.d.ts +5 -4
  627. package/xhr/index.js +18 -18
  628. package/xhr/index.js.map +1 -1
  629. package/xml/index.d.ts +2 -2
  630. package/xml/index.js +1 -1
  631. package/xml/index.js.map +1 -1
  632. package/LICENSE +0 -19
  633. package/fetch/index.mjs +0 -535
@@ -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
- this.notifyActivityCreated(activity, savedInstanceState);
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,94 @@ 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.notifyExit({ android: activity });
109
+ }
55
110
  gc();
56
111
  };
57
112
  NativeScriptLifecycleCallbacksImpl.prototype.onActivityPaused = function (activity) {
113
+ var nativeWindow = Application.android._getWindowForActivity(activity);
58
114
  if ("isNativeScriptActivity" in activity) {
59
- Application.setSuspended(true, {
60
- android: activity,
115
+ Application.android._setWindowActive(nativeWindow, false, activity);
116
+ }
117
+ if (nativeWindow) {
118
+ nativeWindow._notifyEvent(NativeWindowEvents.deactivate);
119
+ nativeWindow.notify({
120
+ eventName: NativeWindowEvents.activityPaused,
121
+ object: nativeWindow,
122
+ window: nativeWindow,
61
123
  activity: activity,
62
124
  });
63
125
  }
64
126
  Application.android.notify({
65
127
  eventName: Application.android.activityPausedEvent,
66
128
  object: Application.android,
129
+ window: nativeWindow,
67
130
  activity: activity,
68
131
  });
69
132
  };
70
133
  NativeScriptLifecycleCallbacksImpl.prototype.onActivityResumed = function (activity) {
71
134
  Application.android.setForegroundActivity(activity);
135
+ var nativeWindow = Application.android._getWindowForActivity(activity);
136
+ if (nativeWindow) {
137
+ nativeWindow._notifyEvent(NativeWindowEvents.activate);
138
+ nativeWindow.notify({
139
+ eventName: NativeWindowEvents.activityResumed,
140
+ object: nativeWindow,
141
+ window: nativeWindow,
142
+ activity: activity,
143
+ });
144
+ }
72
145
  Application.android.notify({
73
146
  eventName: Application.android.activityResumedEvent,
74
147
  object: Application.android,
148
+ window: nativeWindow,
75
149
  activity: activity,
76
150
  });
77
151
  };
78
152
  NativeScriptLifecycleCallbacksImpl.prototype.onActivitySaveInstanceState = function (activity, bundle) {
153
+ var nativeWindow = Application.android._getWindowForActivity(activity);
154
+ if (nativeWindow) {
155
+ bundle.putString(WINDOW_ID_EXTRA, nativeWindow.id);
156
+ nativeWindow.notify({
157
+ eventName: NativeWindowEvents.saveActivityState,
158
+ object: nativeWindow,
159
+ window: nativeWindow,
160
+ activity: activity,
161
+ bundle: bundle,
162
+ });
163
+ }
79
164
  Application.android.notify({
80
165
  eventName: Application.android.saveActivityStateEvent,
81
166
  object: Application.android,
167
+ window: nativeWindow,
82
168
  activity: activity,
83
169
  bundle: bundle,
84
170
  });
@@ -92,9 +178,20 @@ function initNativeScriptLifecycleCallbacks() {
92
178
  activity: activity,
93
179
  });
94
180
  }
181
+ var nativeWindow = Application.android._getWindowForActivity(activity);
182
+ if (nativeWindow) {
183
+ nativeWindow._notifyEvent(NativeWindowEvents.foreground);
184
+ nativeWindow.notify({
185
+ eventName: NativeWindowEvents.activityStarted,
186
+ object: nativeWindow,
187
+ window: nativeWindow,
188
+ activity: activity,
189
+ });
190
+ }
95
191
  Application.android.notify({
96
192
  eventName: Application.android.activityStartedEvent,
97
193
  object: Application.android,
194
+ window: nativeWindow,
98
195
  activity: activity,
99
196
  });
100
197
  };
@@ -106,9 +203,20 @@ function initNativeScriptLifecycleCallbacks() {
106
203
  activity: activity,
107
204
  });
108
205
  }
206
+ var nativeWindow = Application.android._getWindowForActivity(activity);
207
+ if (nativeWindow) {
208
+ nativeWindow._notifyEvent(NativeWindowEvents.background);
209
+ nativeWindow.notify({
210
+ eventName: NativeWindowEvents.activityStopped,
211
+ object: nativeWindow,
212
+ window: nativeWindow,
213
+ activity: activity,
214
+ });
215
+ }
109
216
  Application.android.notify({
110
217
  eventName: Application.android.activityStoppedEvent,
111
218
  object: Application.android,
219
+ window: nativeWindow,
112
220
  activity: activity,
113
221
  });
114
222
  };
@@ -124,10 +232,20 @@ function initNativeScriptLifecycleCallbacks() {
124
232
  activity.setTheme(setThemeOnLaunch);
125
233
  }
126
234
  };
127
- NativeScriptLifecycleCallbacksImpl.prototype.notifyActivityCreated = function (activity, bundle) {
235
+ NativeScriptLifecycleCallbacksImpl.prototype.notifyActivityCreated = function (activity, bundle, nativeWindow) {
236
+ if (nativeWindow) {
237
+ nativeWindow.notify({
238
+ eventName: NativeWindowEvents.activityCreated,
239
+ object: nativeWindow,
240
+ window: nativeWindow,
241
+ activity: activity,
242
+ bundle: bundle,
243
+ });
244
+ }
128
245
  Application.android.notify({
129
246
  eventName: Application.android.activityCreatedEvent,
130
247
  object: Application.android,
248
+ window: nativeWindow,
131
249
  activity: activity,
132
250
  bundle: bundle,
133
251
  });
@@ -233,7 +351,7 @@ const BroadcastReceiver = lazy(() => {
233
351
  function BroadcastReceiverImpl(onReceiveCallback) {
234
352
  var _this = _super.call(this) || this;
235
353
  _this._onReceiveCallback = onReceiveCallback;
236
- return global.__native(_this);
354
+ return _this;
237
355
  }
238
356
  BroadcastReceiverImpl.prototype.onReceive = function (context, intent) {
239
357
  if (this._onReceiveCallback) {
@@ -262,6 +380,10 @@ export class AndroidApplication extends ApplicationCommon {
262
380
  this.activityRequestPermissionsEvent = AndroidApplication.activityRequestPermissionsEvent;
263
381
  this.dialogOnCreateViewEvent = AndroidApplication.activityRequestPermissionsEvent;
264
382
  this.configurationChangeEvent = AndroidApplication.activityRequestPermissionsEvent;
383
+ // Windows currently active. Membership, not a count, so a repeated or missing lifecycle
384
+ // callback cannot drift the aggregate. The registry owns window lifetime, so nothing here
385
+ // outlives the window itself.
386
+ this._activeWindows = new Set();
265
387
  this._registeredReceivers = {};
266
388
  this._registeredReceiversById = {};
267
389
  this._nextReceiverId = 1;
@@ -297,6 +419,10 @@ export class AndroidApplication extends ApplicationCommon {
297
419
  }
298
420
  onConfigurationChanged(configuration) {
299
421
  const diff = configuration.diff(this._prevConfiguration);
422
+ // The application context reports the app-wide configuration, which a window on a
423
+ // second display or in split-screen does not necessarily share, so the primary
424
+ // window is asked first. Each window tracks its own through its activity.
425
+ const primaryWindow = this.primaryWindow;
300
426
  if ((diff & 128) /* ActivityInfo.CONFIG_ORIENTATION */ !== 0) {
301
427
  const nativeApp = Application.android.getNativeApplication();
302
428
  const screenOrientation = nativeApp.getSystemService(android.content.Context.WINDOW_SERVICE).getDefaultDisplay().getRotation();
@@ -314,16 +440,16 @@ export class AndroidApplication extends ApplicationCommon {
314
440
  default:
315
441
  break;
316
442
  }
317
- this.setOrientation(this.getOrientationValue(configuration), degrees);
443
+ this.setOrientation(primaryWindow?.orientation() ?? this.getOrientationValue(configuration), degrees);
318
444
  }
319
445
  if ((diff & 512) /* ActivityInfo.CONFIG_UI_MODE */ !== 0) {
320
- this.setSystemAppearance(this.getSystemAppearanceValue(configuration));
446
+ this.setSystemAppearance(primaryWindow?.systemAppearance() ?? this.getSystemAppearanceValue(configuration));
321
447
  }
322
448
  if ((diff & 1073741824) /* ActivityInfo.CONFIG_FONT_SCALE */ !== 0) {
323
449
  fontScaleChanged(Number(configuration.fontScale));
324
450
  }
325
451
  if ((diff & 8192) /* ActivityInfo.CONFIG_LAYOUT_DIRECTION */ !== 0) {
326
- this.setLayoutDirection(this.getLayoutDirectionValue(configuration));
452
+ this.setLayoutDirection(primaryWindow?.layoutDirection() ?? this.getLayoutDirectionValue(configuration));
327
453
  }
328
454
  this.notify({ eventName: this.configurationChangeEvent, configuration, diff });
329
455
  this._prevConfiguration = new android.content.res.Configuration(configuration);
@@ -353,6 +479,9 @@ export class AndroidApplication extends ApplicationCommon {
353
479
  const nativeApp = this.getNativeApplication();
354
480
  this.init(nativeApp);
355
481
  }
482
+ // The activity lifecycle callbacks are registered but no activity has been created yet,
483
+ // so this always precedes the first `windowOpen`.
484
+ this.notifyReady();
356
485
  }
357
486
  get startActivity() {
358
487
  return androidGetStartActivity();
@@ -437,7 +566,7 @@ export class AndroidApplication extends ApplicationCommon {
437
566
  }
438
567
  }
439
568
  getRegisteredBroadcastReceiver(intentFilter) {
440
- return this._registeredReceivers[intentFilter]?.[0].receiver;
569
+ return this._registeredReceivers[intentFilter]?.[0]?.receiver;
441
570
  }
442
571
  getRegisteredBroadcastReceivers(intentFilter) {
443
572
  const receiversInfo = this._registeredReceivers[intentFilter];
@@ -446,6 +575,100 @@ export class AndroidApplication extends ApplicationCommon {
446
575
  }
447
576
  return [];
448
577
  }
578
+ // --- NativeWindow registry ---
579
+ /**
580
+ * @internal - Get a NativeWindow by its activity.
581
+ */
582
+ _getWindowForActivity(activity) {
583
+ return this._windows.find((nw) => nw.android?.activity === activity);
584
+ }
585
+ /**
586
+ * @internal - Feeds a window's active state into the application-level 'resume'/'suspend'
587
+ * events, which describe the app as a whole: they are raised when the first window becomes
588
+ * active and when the last active one resigns. Callers decide which activities may speak
589
+ * for the app; every window reaching here participates.
590
+ */
591
+ _setWindowActive(nativeWindow, active, activity) {
592
+ if (this._trackWindowActive(nativeWindow, active)) {
593
+ this.setSuspended(!active, {
594
+ // todo: deprecate event.android in favor of event.activity
595
+ android: activity,
596
+ activity,
597
+ });
598
+ }
599
+ }
600
+ /**
601
+ * @returns whether the set flipped between empty and non-empty, which is the only point
602
+ * at which app-level state changes.
603
+ */
604
+ _trackWindowActive(nativeWindow, active) {
605
+ const wasPopulated = this._activeWindows.size > 0;
606
+ // An activity with no registered window cannot join the aggregate, so it only speaks
607
+ // for the app while no window holds the state.
608
+ if (!nativeWindow) {
609
+ return !wasPopulated;
610
+ }
611
+ if (active) {
612
+ this._activeWindows.add(nativeWindow);
613
+ }
614
+ else {
615
+ this._activeWindows.delete(nativeWindow);
616
+ }
617
+ return wasPopulated !== this._activeWindows.size > 0;
618
+ }
619
+ // --- Multi-window support ---
620
+ /**
621
+ * Opens a new window by launching the start activity into its own task.
622
+ *
623
+ * @param options Options for the new window. `options.data` is put on the launch
624
+ * intent as extras and surfaces as the window's `data`.
625
+ *
626
+ * @experimental The start activity's `launchMode` in AndroidManifest.xml decides whether a
627
+ * second instance can exist at all: `singleTask` (the app template default) and
628
+ * `singleInstance` route the intent to the existing activity's `onNewIntent` instead of
629
+ * creating one. `singleInstancePerTask` (API 31+) keeps single-task behavior for launcher
630
+ * and deep-link starts while still allowing the `MULTIPLE_TASK`/`NEW_DOCUMENT` launch used
631
+ * here; `standard` also works. When the app is already in split-screen, the new window
632
+ * opens in the adjacent pane; otherwise it covers the current one and both show in recents.
633
+ */
634
+ openWindow(options) {
635
+ warnMultiWindowIsExperimental();
636
+ const context = this.context ?? this.getNativeApplication();
637
+ const intent = new android.content.Intent();
638
+ const windowActivities = this._getWindows()
639
+ .filter((window) => window.state === 'attached' && !window._surfaceGone)
640
+ .map((window) => window.activity);
641
+ // startActivity/foregroundActivity can be third-party (SDK) activities, which must never be relaunched as a window.
642
+ const startActivity = [this.startActivity, this.foregroundActivity, ...windowActivities].find((activity) => activity && 'isNativeScriptActivity' in activity && !activity.isFinishing() && !activity.isDestroyed());
643
+ if (startActivity) {
644
+ intent.setClass(context, startActivity.getClass());
645
+ }
646
+ else {
647
+ const component = context.getPackageManager().getLaunchIntentForPackage(context.getPackageName())?.getComponent();
648
+ if (!component) {
649
+ throw new Error('Unable to open a window: no NativeScript activity or launch activity was found.');
650
+ }
651
+ intent.setComponent(component);
652
+ }
653
+ let flags = android.content.Intent.FLAG_ACTIVITY_NEW_TASK | android.content.Intent.FLAG_ACTIVITY_MULTIPLE_TASK | android.content.Intent.FLAG_ACTIVITY_NEW_DOCUMENT;
654
+ const launcher = this.foregroundActivity ?? startActivity;
655
+ if (SDK_VERSION >= 24 && launcher?.isInMultiWindowMode()) {
656
+ flags |= android.content.Intent.FLAG_ACTIVITY_LAUNCH_ADJACENT;
657
+ }
658
+ intent.setFlags(flags);
659
+ const data = options?.data;
660
+ if (data) {
661
+ for (const key of Object.keys(data)) {
662
+ intent.putExtra(key, dataSerialize(data[key], true));
663
+ }
664
+ }
665
+ if (launcher) {
666
+ launcher.startActivity(intent);
667
+ }
668
+ else {
669
+ context.startActivity(intent);
670
+ }
671
+ }
449
672
  getRootView() {
450
673
  const activity = this.startActivity;
451
674
  if (!activity) {
@@ -469,9 +692,10 @@ export class AndroidApplication extends ApplicationCommon {
469
692
  callbacks.resetActivityContent(activity);
470
693
  }
471
694
  getSystemAppearance() {
472
- const resources = this.context.getResources();
473
- const configuration = resources.getConfiguration();
474
- return this.getSystemAppearanceValue(configuration);
695
+ return this.getSystemAppearanceValue(this.getConfiguration());
696
+ }
697
+ getConfiguration() {
698
+ return (this.context ?? this.getNativeApplication()).getResources().getConfiguration();
475
699
  }
476
700
  // https://developer.android.com/guide/topics/ui/look-and-feel/darktheme#configuration_changes
477
701
  getSystemAppearanceValue(configuration) {
@@ -485,9 +709,7 @@ export class AndroidApplication extends ApplicationCommon {
485
709
  }
486
710
  }
487
711
  getLayoutDirection() {
488
- const resources = this.context.getResources();
489
- const configuration = resources.getConfiguration();
490
- return this.getLayoutDirectionValue(configuration);
712
+ return this.getLayoutDirectionValue(this.getConfiguration());
491
713
  }
492
714
  getLayoutDirectionValue(configuration) {
493
715
  const layoutDirection = configuration.getLayoutDirection();
@@ -499,9 +721,7 @@ export class AndroidApplication extends ApplicationCommon {
499
721
  }
500
722
  }
501
723
  getOrientation() {
502
- const resources = this.context.getResources();
503
- const configuration = resources.getConfiguration();
504
- return this.getOrientationValue(configuration);
724
+ return this.getOrientationValue(this.getConfiguration());
505
725
  }
506
726
  getOrientationValue(configuration) {
507
727
  const orientation = configuration.orientation;
@@ -535,6 +755,7 @@ AndroidApplication.activityRequestPermissionsEvent = 'activityRequestPermissions
535
755
  AndroidApplication.dialogOnCreateViewEvent = 'dialogOnCreateView';
536
756
  AndroidApplication.configurationChangeEvent = 'configurationChange';
537
757
  export * from './application-common';
758
+ export * from './application-interfaces';
538
759
  export const Application = new AndroidApplication();
539
760
  export const iOSApplication = undefined;
540
761
  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,C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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","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.notifyExit({ android: activity });\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\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"]}