Bluetooth
On most devices, you will want to use the MIDI Output module instead of this to send MIDI via Bluetooth. Once you have created a MIDI Output module, open its settings and either select "Scan for Bluetooth devices" or "Advertise as Bluetooth device", depending on if your device should be the Bluetooth central or peripheral device.
The MIDI Output module will use the native Bluetooth MIDI implementation by Apple or Google.
But on Android, there are some devices that do not natively support Bluetooth MIDI at all. And all Android devices do not natively support Bluetooth MIDI if the device should be the "peripheral".
In Bluetooth LE, the devices can have two states: They can either be the "central" or the "peripheral". The "central" device actively scans for other devices and can connect to these, while the "peripheral" regularly advertises that it is there and that someone can connect to it, but it cannot actively connect.
So to also support this on Android, I made my own implementation of the Bluetooth MIDI specification. So again, if you can and your device supports it, use the Bluetooth connection from the MIDI Output instead. But for those devices that do not support Bluetooth MIDI, or if you need your device to be the "peripheral", you can use this instead.