Skip to content

Commit

Permalink
Fix PendingIntent for Android 12
Browse files Browse the repository at this point in the history
Starting with API level 31, a flag for mutable or immutable intent is
now required or an exception will be generated crashing the app. This
fixes a crash seen in PR ge0rg#382
  • Loading branch information
penguin359 committed Aug 4, 2024
1 parent e93b820 commit 30353a5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/backend/DigiRig.scala
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class DigiRig(service : AprsService, prefs : PrefsWrapper) extends AfskUploader(
var alreadyRunning = false

val intent = new Intent(USB_PERM_ACTION)
val pendingIntent = PendingIntent.getBroadcast(service, 0, intent, 0)
val pendingIntent = PendingIntent.getBroadcast(service, 0, intent, PendingIntent.FLAG_MUTABLE)

// Audio stuff
var audioPlaying = false
Expand Down

0 comments on commit 30353a5

Please sign in to comment.