From 52c890479d819ac4ed19c8566e242a208769ab25 Mon Sep 17 00:00:00 2001 From: QQ Date: Sat, 14 Nov 2026 14:09:12 +0800 Subject: [PATCH] Import apps/android/index.ts --- apps/android/index.ts | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 apps/android/index.ts diff --git a/apps/android/index.ts b/apps/android/index.ts new file mode 100644 index 0000000..111d78b --- /dev/null +++ b/apps/android/index.ts @@ -0,0 +1,18 @@ +import './src/polyfills'; +import { registerRootComponent } from 'expo'; +import { registerGlobals } from 'react-native-webrtc'; +import { AppRegistry } from 'react-native'; +import { foregroundService } from './src/services/foreground-service'; + +import App from './App'; + +registerGlobals(); + +// An FGS alone does not stop RN from pausing timers on Activity.onPause. +// The native service owns this task's lifetime and releases it on disconnect. +AppRegistry.registerHeadlessTask('DshRemoteConnection', () => ({ lifetimeId }: { lifetimeId: string }) => foregroundService.waitUntilStopped(lifetimeId)); + +// registerRootComponent calls AppRegistry.registerComponent('main', () => App); +// It also ensures that whether you load the app in Expo Go or in a native build, +// the environment is set up appropriately +registerRootComponent(App);