Hello,
i want to connect phone with bluetooth speaker and take mediaplayer to play songs
optionally by phonespeaker or by BT-speaker. In the app I switch on BT, make connection, disconnection and
get feedback if its connected or disconnected.
Problem is the BT-speaker output. In the moment it works only by
switch on manually with "Media audio" on under the menu option
"Bluetooth / Paired devices".
How can I program that?
Thank you and best regards
Michael
You can enable Bluetooth with BluetoothAdmin however you cannot programmatically connect to a speaker. Your best option is to open the BT settings page:
B4X:
Dim in As Intent
in.Initialize("android.settings.BLUETOOTH_SETTINGS", "")
StartActivity(in)