diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index ced71e7..9dca9fc 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -1,9 +1,6 @@ + xmlns:tools="http://schemas.android.com/tools"> + + = Build.VERSION_CODES.S) { + listOf( "android.permission.BLUETOOTH_CONNECT", "android.permission.BLUETOOTH_SCAN", "android.permission.BLUETOOTH", "android.permission.BLUETOOTH_ADMIN", - "android.permission.BLUETOOTH_ADVERTISE", - "android.permission.POST_NOTIFICATIONS", - "android.permission.READ_PHONE_STATE", - "android.permission.ANSWER_PHONE_CALLS", + "android.permission.BLUETOOTH_ADVERTISE" ) + } else { + listOf( + "android.permission.BLUETOOTH", + "android.permission.BLUETOOTH_ADMIN", + "android.permission.ACCESS_FINE_LOCATION" + ) + } + val otherPermissions = listOf( + "android.permission.POST_NOTIFICATIONS", + "android.permission.READ_PHONE_STATE", + "android.permission.ANSWER_PHONE_CALLS" + ) + val allPermissions = bluetoothPermissions + otherPermissions + + val permissionState = rememberMultiplePermissionsState( + permissions = allPermissions ) val airPodsService = remember { mutableStateOf(null) }