From 751c2878f71675d39cfb76464184ea1f026785c0 Mon Sep 17 00:00:00 2001 From: Bryan Van Deusen Date: Fri, 8 May 2026 22:33:30 -0400 Subject: [PATCH] fix(flutter/android): production manifest + AudioServiceActivity MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Two related Android setup gaps caught when running on a clean Pixel 6 emulator: 1. MainActivity extended FlutterActivity, but the audio_service plugin requires AudioServiceActivity. AudioService.init() threw PlatformException("The Activity class declared in your AndroidManifest.xml is wrong"), and the partial-engine-reinit that followed cascaded into a flutter_cache_manager SQLite EXCLUSIVE lock crash. Both errors clear with the correct base class. 2. The main manifest was missing two production permissions: - POST_NOTIFICATIONS — Android 13+ runtime requirement for the media notification (now-playing tile in the system tray). audio_service auto-prompts at init() time once declared. - ACCESS_NETWORK_STATE — used by ConnectionErrorBanner + flutter_cache_manager for connectivity awareness. Note for future contributors: src/main/AndroidManifest.xml IS the production manifest. The src/debug and src/profile variants only add dev-only entries (e.g. INTERNET re-declared in debug for hot-reload). There is no separate "release" manifest in Flutter's convention. Co-Authored-By: Claude Opus 4.7 (1M context) --- .../android/app/src/main/AndroidManifest.xml | 6 ++++++ .../kotlin/com/fabledsword/minstrel/MainActivity.kt | 10 ++++++++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/flutter_client/android/app/src/main/AndroidManifest.xml b/flutter_client/android/app/src/main/AndroidManifest.xml index f341429d..0cb708d7 100644 --- a/flutter_client/android/app/src/main/AndroidManifest.xml +++ b/flutter_client/android/app/src/main/AndroidManifest.xml @@ -1,8 +1,14 @@ + + + +