In general, low-level access to hardware is not possible in android apps. So regarding USB-C, Bluetooth, NFC, etc. it all depends on what the application want to do.
In general Sailfish OS only provides to Aliendalvik a few high-level interfaces: output image to a window of the compositor, getting input from some libinput device, sending audio out.
low-level bluetooth, USB, etc. devices aren’t exposed to Aliendalvik. (That would require somebody writing a translation layer between Sailfish OS’ standard linux bluez stack and whatever is the current Android API that applications expect to see).
So:
- plugging a keyboard / or pairing a bluetooth one and typing messages in Whatsapp? works. from Android’s point of view it’s just an input device.
- using the specific application to reconfigure which buttons or screen taps the physicial buttons of a game joystick map to? No that needs to be done on an Android phone, as it would require a low-level access to the device for some device-specific protocol, it’s not a simple input device.
- pairing a bluetooth speaker and playing music in an app? works. It’s just an audio-out from Android’s point of view.
- using the device specific application to tweak equaliser profiles, or to chain multiple speakers together? No, that requires low-level to the bluetooth stack because it’s not a standard audio protocol. You’d need to do it using the hardware buttons on the speaker (e.g. on logitech it’s bluetooth and
+
on the first and 2x bluetooth on the second) or do it on a separate android device.
- using the device specific application to tweak equaliser profiles, or to chain multiple speakers together? No, that requires low-level to the bluetooth stack because it’s not a standard audio protocol. You’d need to do it using the hardware buttons on the speaker (e.g. on logitech it’s bluetooth and
Note that there’s currently a few audio routing problems in Sailfish OS, but there are small fixeable bugs:
- Android apps don’t always succesfully communicate their intent to Sailfish and Sailfish might route the audio to the wrong device: if the camera is on in a call in Zoom or WhatsApp, Sailfish wrongly assumes this is a “ringtone” and always route the audio to the built-in external speaker, even if there’s an earphone jacked in or paired with.
- USB audio routing is broken. The correct module is active, but audio is never routed to USB-C audio devices. Audio jack works fine though, it’s really specific to USB audio.
The above could probably be even manually circumvented just by directly diverting the routing in PulseAudio (either command-line or in one of the 3rd party app available on openrepos or chum) but I’ve never bothered trying as I’m not that much affected by that.
You mean using your phone as a power-bank for your earbuds?
Works, but I don’t get a menu for that, it’s entirely the charger-controller of the phone negociating with the earbuds’ one.
(Though note the above caveat about audiorouting bugs and USB-audio. My wireless earphone will charge, but no sound will come out of it, unlike when plugged in a laptop).
The only setting you get is for the behaviour when the phone is plugged in as a USB target:
- Developer mode (smartphone shows as network device, you can SSH, etc.)
- Media transfer (smartphone exposes pictures, etc. to computer as most standard phones and camera do).
- Charging only (only charges, doesn’t show up to the USB host).
- Always ask (a pop-up opens always when the device is plugged in)
Notes:
- No menu about charging from/to direction.
- The smartphone will always be in charging only mode, until it is unlocked and/or a menu item has been picked up. (Just plugging the phone in doesn’t bring up the developer mode’s network up. You need to plug and touch the fingerprint).
- No support for USB-MIDI unlick the stock Sony Xperias’ Android.
- Funny side note: there was reportedly a bug in some of the earliest Raspberry Pi 4 where the wrong resistors were used on the identification pins and thus those old Pis also declared themselves as “I am an earbud” to the charger controllers.