I have been trying for several days to send Google Text-to-speech text messages via SmartBand Talk (SWR30). I have the correct permission on AndroidManifest.xml
PERMISSION_CONTROL_EXTENSION, BLUETOOTH_ADMIN, BLUTUS, MODIFY_AUDIO_SETTINGS, BROADCAST_STICKY
And I use this code to get AudioManager:
mAudioManager = (AudioManager) context .getSystemService(Context.AUDIO_SERVICE);
And using AudioManager to talk through SmartBand, we say this:
mAudioManager.setSpeakerphoneOn(false); mAudioManager.startBluetoothSco(); mAudioManager.setMode(AudioManager.MODE_IN_CALL); mAudioManager.setBluetoothScoOn(true); speakMethod();
This solution works for some devices, which means that I can really hear the message through SmartBand Talk. But for some other devices (like Samsung Galaxy S5 4.4.2, LG Nexus 5 Lollipop and Sony Z3 4.4.4) this solution doesnβt work quite charming, because rarely the sound passes through SmartBand Talk, speaking almost 95% of the time on the phone, and not on the paired bluetooth device.
I would like to know if the device extension works correctly in this scenario, where the audio will be sent to the Bluetooth device, correctly paired with the phone.
I would like to know if it is possible to have something stable, work on every phone or if it is not possible.
source share