mirror of
https://git.undefined-dev.fr/Blendman974/faceclaw.git
synced 2026-11-19 21:03:09 +00:00
35 lines
1.3 KiB
TypeScript
35 lines
1.3 KiB
TypeScript
/*
|
||
In NativeScript, the app.ts file is the entry point to your application.
|
||
You can use this file to perform app-level initialization, but the primary
|
||
purpose of the file is to pass control to the app’s first module.
|
||
*/
|
||
|
||
import { Application } from '@nativescript/core'
|
||
import { registerShareIntentHandler } from './native/share-intents'
|
||
import { installNativeUserAgent } from './util/http'
|
||
import { registerPhoneRotation } from './native/phone-rotation'
|
||
|
||
installNativeUserAgent()
|
||
registerShareIntentHandler()
|
||
registerPhoneRotation()
|
||
|
||
import { startLiveHealthSync, startAlignedRingPull } from './health/health-live'
|
||
|
||
installNativeUserAgent()
|
||
registerShareIntentHandler()
|
||
|
||
// Ring health records live only in the communicator's memory until something
|
||
// stores them. Both health surfaces store on open, but a pull that lands while
|
||
// they are closed would be lost if the process restarted first, so this keeps
|
||
// them reaching disk regardless. No-op when there is nothing new.
|
||
startLiveHealthSync()
|
||
|
||
// Collect from the ring on a wall-clock cadence (:01 and :31). Without this
|
||
// nothing drives a pull on a timer at all - only onRingReady() on reconnect -
|
||
// so a ring that stays connected is never read.
|
||
startAlignedRingPull()
|
||
|
||
Application.run({ moduleName: 'app-root' })
|
||
|
||
// Don't place any code after the application has been started
|