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 #382
  • Loading branch information
penguin359 authored and bxlentpartyon committed Aug 7, 2024
1 parent 29abb67 commit d308e42
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 d308e42

Please sign in to comment.