diff --git a/media/java/android/media/midi/package.html b/media/java/android/media/midi/package.html index a6753913bf3e2..7baa5bc42bd2c 100644 --- a/media/java/android/media/midi/package.html +++ b/media/java/android/media/midi/package.html @@ -31,7 +31,7 @@ capabilities, etc.
MIDI devices can be connected to Android using Bluetooth LE.
+ +Before using the device, the app must scan for available BTLE devices and then allow +the user to connect. An example program +will be provided so look for it on the Android developer website.
+ +Applications that scan for Bluetooth devices must request permission in the +manifest file. This LOCATION permission is required because it may be possible to +guess the location of an Android device by seeing which BTLE devices are nearby.
+ ++<uses-permission android:name="android.permission.BLUETOOTH"/> +<uses-permission android:name="android.permission.BLUETOOTH_ADMIN"/> +<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/> ++ +
Apps must also request location permission from the user at run-time.
+See the documentation for Activity.requestPermissions() for details and an example.
+
The app will only want to see MIDI devices and not mice or other non-MIDI devices. +So construct a ScanFilter using the UUID for standard MIDI over BTLE.
+ ++MIDI over BTLE UUID = "03B80E5A-EDE8-4B33-A751-6CE34EC4C700" ++ +
See the documentation for android.bluetooth.le.BluetoothLeScanner.startScan()
+method for details. When the user selects a MIDI/BTLE device then you can open it
+using the MidiManager.
+m.openBluetoothDevice(bluetoothDevice, callback, handler); ++ +
Once the MIDI/BTLE device has been opened by one app then it will also become available to other +apps using the +MIDI device discovery calls described above. +
+