Enable audio communication via a Bluetooth SCO link
####Create a SCO link
BluetoothSco.start(function() {
// success callback
}, function() {
// error callback
}, {enablePlayback: true});
The last argument is optional. If enablePlayback
is set false
(or not at all), the link is used to route audio from the Bluetooth headset to the phone (one-way link). If set true
as above, a two-way link is created.
####Remove SCO link
BluetoothSco.start(function() {
// success callback
}, function() {
// error callback
});
The plugin will not switch device's Bluetooth on or off, or try to pair with a headset. You have to do that in some other part of your code.