Skip to content

Commit

Permalink
fix: Crash caused by missing permission on Android 12
Browse files Browse the repository at this point in the history
The crash appeared since changing the target API to 33
as BLUETOOTH_CONNECT and BLUETOOTH_SCAN should required
at runtime.
  • Loading branch information
kienvo committed May 23, 2024
1 parent 5f62269 commit dc03f95
Showing 1 changed file with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,17 @@ class BadgeMagicPermission private constructor() {
val allPermissions = arrayOf(
Manifest.permission.WRITE_EXTERNAL_STORAGE,
Manifest.permission.ACCESS_FINE_LOCATION,
Manifest.permission.BLUETOOTH,
Manifest.permission.BLUETOOTH_ADMIN,
Manifest.permission.BLUETOOTH_PRIVILEGED,
Manifest.permission.BLUETOOTH_SCAN,
Manifest.permission.BLUETOOTH_CONNECT,
)

val storagePermissions = arrayOf(Manifest.permission.WRITE_EXTERNAL_STORAGE)

val locationPermissions = arrayOf(Manifest.permission.ACCESS_FINE_LOCATION)

val bluetoothPermissions = arrayOf(
Manifest.permission.BLUETOOTH,
Manifest.permission.BLUETOOTH_ADMIN,
Manifest.permission.BLUETOOTH_PRIVILEGED,
Manifest.permission.BLUETOOTH_CONNECT,
Manifest.permission.BLUETOOTH_SCAN,
)

val ALL_PERMISSION = 100
Expand Down

0 comments on commit dc03f95

Please sign in to comment.