Browse Source

Android: Add missing runtime permission for Bluetooth Midi on API >= 31

v7.0.9
attila Tom Poole 2 years ago
parent
commit
8fa90784a1
2 changed files with 3 additions and 2 deletions
  1. +1
    -1
      extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_Android.h
  2. +2
    -1
      modules/juce_core/native/juce_android_RuntimePermissions.cpp

+ 1
- 1
extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_Android.h View File

@@ -1145,7 +1145,7 @@ private:
"If enabled, this will set the android.permission.BLUETOOTH_ADVERTISE, android.permission.BLUETOOTH and android.permission.BLUETOOTH_ADMIN flags in the manifest.");
props.add (new ChoicePropertyComponent (androidBluetoothConnectNeeded, "Bluetooth Connect Required"),
"If enabled, this will set the android.permission.BLUETOOTH_CONNECT, android.permission.BLUETOOTH and android.permission.BLUETOOTH_ADMIN flags in the manifest.");
"If enabled, this will set the android.permission.BLUETOOTH_CONNECT, android.permission.BLUETOOTH and android.permission.BLUETOOTH_ADMIN flags in the manifest. This is required for Bluetooth MIDI on Android.");
props.add (new ChoicePropertyComponent (androidReadMediaAudioPermission, "Read Audio From External Storage"),
"If enabled, this will set the android.permission.READ_MEDIA_AUDIO and android.permission.READ_EXTERNAL_STORAGE flags in the manifest.");


+ 2
- 1
modules/juce_core/native/juce_android_RuntimePermissions.cpp View File

@@ -39,7 +39,8 @@ static StringArray jucePermissionToAndroidPermissions (RuntimePermissions::Permi
if (getAndroidSDKVersion() < 31)
return { "android.permission.ACCESS_FINE_LOCATION" };
return { "android.permission.BLUETOOTH_SCAN" };
return { "android.permission.BLUETOOTH_SCAN",
"android.permission.BLUETOOTH_CONNECT" };
}
case RuntimePermissions::writeExternalStorage: return { "android.permission.WRITE_EXTERNAL_STORAGE" };


Loading…
Cancel
Save