Cordova no sound on bluetooth speakers

18 views
Skip to first unread message

Baraa Mohamad

unread,
Oct 9, 2017, 11:55:15 AM10/9/17
to phonegap

Hello,

I am working on an android  
 (and IOS) application, the application plays audio messages without problem. My problem is as follow:

if the mobile is already connected to bluetooth (bluetooth enabled and connected), if then I launch my application and I play an audio file in this case I hear nothing neither on the telephine nor on the bluetooth speaker. 


But, if I launch my application and then I activate the bluetooth,then play the audio file, there is no problem, the sound goes out well on my bluetooth speakers.

The solution I used for now is that when I launch my application I disable completely the bluetooth and then I restart it on the onDeviceready (using a plugin cordova) it works fin like that  but it is not ideal as solution, it is very annoying for the users that the bluetooth disconnect and reconnect especially when it is the bluetooth of the car.

Does anyone have the same problem and can you help me find another solution.

I use the latest versions of Cordova (7.0.1), android (6.2.3) ...
and I use the plugova cordova-plugin-bluetoothle to restart bluetooth (disable then enable after the launch of the application)

Any Idea please?

Reply all
Reply to author
Forward
0 new messages