diff --git a/front/apps/mobile/app.config.ts b/front/apps/mobile/app.config.ts index ecf8cb7b..85044c04 100644 --- a/front/apps/mobile/app.config.ts +++ b/front/apps/mobile/app.config.ts @@ -79,8 +79,19 @@ const config: ExpoConfig = { const withForegroundService = (c: ExpoConfig): ExpoConfig => { return withAndroidManifest(c, async (config) => { const manifest = config.modResults.manifest; - console.log(manifest); - // manifest.application!.push(); + manifest.application![0].service ??= []; + manifest.application![0].service.push({ + $: { + "android:name": "com.brentvatne.exoplayer.VideoPlaybackService", + "android:exported": "false", + "android:foregroundServiceType": "mediaPlayback", + }, + "intent-filter": [ + { + action: [{ $: { "android:name": "androidx.media3.session.MediaSessionService" } }], + }, + ], + }); return config; }); }; diff --git a/front/apps/mobile/package.json b/front/apps/mobile/package.json index 4a311326..dc3cb697 100644 --- a/front/apps/mobile/package.json +++ b/front/apps/mobile/package.json @@ -5,8 +5,8 @@ "sideEffects": false, "scripts": { "dev": "expo start", - "android": "expo start --android", - "ios": "expo start --ios", + "android": "expo run:android", + "ios": "expo run:ios", "web": "expo start --web", "build": "eas build --profile production --platform android --non-interactive --auto-submit", "build:apk": "eas build --profile preview --platform android --non-interactive --json",