Skip to content

Commit

Permalink
chore: add TODO for Android 15 targetting
Browse files Browse the repository at this point in the history
  • Loading branch information
timschneeb committed Dec 15, 2024
1 parent 06d9701 commit 0d74de9
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,18 @@ class BootCompletedReceiver : BroadcastReceiver(), KoinComponent {
// Root version: if enhanced processing mode is on, we need to start the service manually
if(preferences.get<Boolean>(R.string.key_audioformat_enhanced_processing) &&
!preferences.get<Boolean>(R.string.key_audioformat_processing)) {

/*
FIXME: When targetting Android 15+, we are not allowed to start a
media_playback/media_projection foreground service from a BOOT_COMPLETED receiver.
Possible solutions:
- Also use EngineLauncherActivity for this.
Downside: requires SYSTEM_ALERT_WINDOW permission for the root build
- Better: Use the special use FGS type instead of media_playback for the root service.
Ref: https://developer.android.com/about/versions/15/behavior-changes-15#fgs-sysalert
*/
RootAudioProcessorService.startServiceEnhanced(context)
}
else if(preferences.get<Boolean>(R.string.key_audioformat_processing))
Expand Down

0 comments on commit 0d74de9

Please sign in to comment.