Repository navigation
Feature/boot notification - #6
Merged
Merged
Conversation
Change from dataSync to specialUse foreground service type to avoid the 6-hour timeout that dataSync has on Android 15+. This allows the folder monitoring service to run indefinitely. - Change FOREGROUND_SERVICE_DATA_SYNC permission to FOREGROUND_SERVICE_SPECIAL_USE - Add PROPERTY_SPECIAL_USE_FGS_SUBTYPE with justification for Google Play - Update startForeground() to specify FOREGROUND_SERVICE_TYPE_SPECIAL_USE on API 34+
- Remove API < 26 checks (minSdk is 26, else branches were unreachable) - Simplify overlay permission check (canDrawOverlays available since API 23) - Add comprehensive KDoc to BootCompatHelper with Android version matrix - Document FGS restrictions for Android 14, 15, and 16
- Move notification logic from TranslanderApp to ServiceAlertNotification class - Make notification ongoing (requires tap to dismiss) - SettingsActivity.onResume() restarts audio monitor if enabled - Dismiss boot notification after services start successfully This completes the Android 14+ boot workaround: when FGS cannot start at boot, user sees a persistent notification and tapping it (or opening the app) starts the services.
Add service_start_services string to all 24 supported languages.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Android 14+ Boot Notification & FGS Improvements
Summary
Handle Android 14+ restrictions that prevent starting foreground services with restricted types (microphone, dataSync) from BOOT_COMPLETED. Also fix the 6-hour dataSync timeout on Android 15+ by switching to specialUse FGS type.
Changes
Boot notification workaround (Android 14+):
AudioMonitorService FGS type fix:
Code cleanup: