autoReconnect after calling a2dp_sink.end and a2dp_sink.start #313
-
Hi, Been building a little portable audio development board and I'm wondering if it's possible to reconnect to the last connected device automatically after shutting down the a2dp_sink with a an .end() and restarting with .start() again later? Use case: Currently the auto-reconnect works if the a2dp_sink keeps running in the background and the phone's bluetooth is switched off and back on again, no problem. But if the service is toggled off with .end() and then restarted with .start(), then it's required to manually reconnect from the phone to the a2dp_sink. Not sure if calling .end(), the last connected device is saved or discarded, or when calling .start() the last connected device is discarded. Otherwise a very easy to use a2dp bluetooth library +1 |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
If you double check in the source code, calling end() is clearning the last connected device. Feel free to create your own subclass and overwrite the end() method as described in the design overview |
Beta Was this translation helpful? Give feedback.
-
Just to give the answer to anybody else who might wonder about this later. In "BluetoothA2DPCommon.cpp"
|
Beta Was this translation helpful? Give feedback.
If you double check in the source code, calling end() is clearning the last connected device. Feel free to create your own subclass and overwrite the end() method as described in the design overview