[APP][4.0+] AudioBT: Use Bluetooth headset for GPS and notification audio

Which of these applications do you use with AudioBT

  • Google Maps

    Votes: 73 60.3%
  • Waze

    Votes: 43 35.5%
  • HERE maps

    Votes: 15 12.4%
  • Sygic

    Votes: 9 7.4%
  • Tomtom

    Votes: 12 9.9%
  • Copilot

    Votes: 2 1.7%
  • NDrive

    Votes: 2 1.7%
  • Other navigation applications

    Votes: 14 11.6%
  • I use it for text messages

    Votes: 18 14.9%

  • Total voters
    121
Search This thread

TurboLed

Senior Member
Mar 2, 2012
162
73
Hi

I've created a small app that automatically switch your device into Bluetooth call mode when an app is playing an audio or when your GPS is giving directions. The benefit is that it will cut what you're currently listening from your car audio system to play the incoming call audio and go back to your current listening on your CD, MP3, FM radio, etc.

There are two ways of using AudioBT.

-One is a background service that monitors the audio focus and turn on the Bluetooth SCO proile when another app is temporarily requesting the audio focus. Unfortunately the first second of the audio might be cut when using this service (to be fixed with upcoming Xposed hook). Some applications do not request the audio focus properly so this might not always work.

-The other approach is an integrated TTS engine. Any app using tne Android TTS service can use the AudioBT TTS service for sending text to speech. AudioBT will automatically turn on the Bluetooth SCO profile before playing the text. Any TTS service or language can be selected in the AudioBT TTS parameters.

It is still experimental and user's feedback is appreciated.

Thank you!





https://play.google.com/store/apps/...51bGwsMSwxLDEsImNvbS50dXJib2xlZC5hdWRpb2J0Il0



Service intents (for use with Tasker)

com.turboled.audiobtplus.ON : Cat = Default, Target = Service. Turns ON the AudioBT Plus service.
com.turboled.audiobtplus.OFF: Cat = Default, Target = Service. Turns OFF the AudioBT Plus service.
com.turboled.audiobtplus.SCO_ENABLE : Cat = Default, Target = Service. Enables Bluetooth SCO channel audio.
com.turboled.audiobtplus.SCO_DISABLE : Cat = Default, Target = Service. Disables Bluetooth SCO channel audio.
com.turboled.audiobtplus.PLAY : Cat = Default, Mime Type = audio/*, Data = file uri (file:///*), Target = Service. Plays an audio file through the bluetooth channel. No need to call SCO_ENABLE or SCO_DISABLE. Specify file name in Data.

To play notifications through Bluetooth with Tasker, create a new task with the following steps:
-Say to file (Misc), text = %NTITLE, file = /sdcard/Download/1.wav. Use standard TTS engine (Pico, Google, SVox, etc...), EnhancedTTS or AudioBT+ TTS are not supported.
-Send an intent (Misc), action = com.turboled.audiobtplus.PLAY, cat = Default, Mime type = audio/*, Data = file:///sdcard/download/1.wav, Target = Service.

Add a new profile with Event -> UI -> Notification and link with the task created above.

Add the task to any profile triggered on Notification *,*. Make sure Tasker is enabled in your Accessibility parameters.
 
Last edited:

hoss_n2

Senior Member
Re: [APP][4.0+] AudioBT: Use Bluetooth incoming call for GPS audio

Hi

I've created a small app that automatically switch your device into Bluetooth call mode when an app is playing an audio or when your GPS is giving directions. The benefit is that it will cut what you're currently listening from your car audio system to play the incoming call audio and go back to your current listening on your CD, MP3, FM radio, etc.

There are two ways of using AudioBT.

-One is a background service that monitors the audio focus and turn on the Bluetooth SCO proile when another app is temporarily requesting the audio focus. Unfortunately the first second of the audio might be cut when using this service. Some applications do not request the audio focus properly so this might not always work.

-The other approach is an integrated TTS engine. Any app using tne Android TTS service can use the AudioBT TTS service for sending text to speech. AudioBT will automatically turn on the Bluetooth SCO profile before playing the text. Any TTS service or language can be selected in the AudioBT TTS parameters.

It is still experimental and user's feedback is appreciated.

Thank you!




Links please

Sent from my GT-N8000 using XDA Premium HD app
 

TurboLed

Senior Member
Mar 2, 2012
162
73
New version 2.2.0 to be published soon on Google Play. Attempt to fix compatibility issue with some devices. If you tried this app on your phone and it didn't work, try the upcoming version.
Thanks
 
  • Like
Reactions: RuggedHunter

sebistan

Member
Feb 9, 2013
6
5
I've tried your app with my alpine cde 133bt, but the tts-messages were still send to the normal bluetooth audio-out channel, so I have to manually switch from tuner to bluetooth mode. Both the service and the custom tts-engine didn't work. Your app is exactly what i've been looking for, so let me know if there is anything I can do, to help fix this.

my setup: I have a motorola razr running on android 4.0, which connects to the radio with the HFP and with the A2DP profile. turning a2dp off in the bluetooth settings redirected the tts-messages to the mobile speaker.
 
  • Like
Reactions: TurboLed

TurboLed

Senior Member
Mar 2, 2012
162
73
I've tried your app with my alpine cde 133bt, but the tts-messages were still send to the normal bluetooth audio-out channel, so I have to manually switch from tuner to bluetooth mode. Both the service and the custom tts-engine didn't work. Your app is exactly what i've been looking for, so let me know if there is anything I can do, to help fix this.

my setup: I have a motorola razr running on android 4.0, which connects to the radio with the HFP and with the A2DP profile. turning a2dp off in the bluetooth settings redirected the tts-messages to the mobile speaker.

Hi,

I've got other similar complains from Motorola users. I have not been able to figure out the problem yet. Are you able to provide me with a Logcat when you start the AudioBT service ?

Also can you test BTMono, which is a similar app but that leaves the audio channel open (incoming call) ? If BTMono works my app should work. However BTMono is from a different author and uses more permissions.

Thanks
 
  • Like
Reactions: RuggedHunter

TurboLed

Senior Member
Mar 2, 2012
162
73
  • Like
Reactions: RuggedHunter

sebistan

Member
Feb 9, 2013
6
5
here is the logcat record, i hope it helps. i started recording, started your service and pressed the test audio button.

i also tried the two test versions, they both did not work, same behaviour as the original one :(

edit: aparantly i'm not allowed to post external links (or edit my post for 5 minutes). i've attached the logcat output
 

Attachments

  • 2013-02-10-18-59-22.txt
    50.4 KB · Views: 181
Last edited:
  • Like
Reactions: TurboLed

TurboLed

Senior Member
Mar 2, 2012
162
73
here is the logcat record, i hope it helps. i started recording, started your service and pressed the test audio button.

i also tried the two test versions, they both did not work, same behaviour as the original one :(

Thanks for your help. Where's the log ? Ah there it is :)
 
Last edited:

TurboLed

Senior Member
Mar 2, 2012
162
73
here is the logcat record, i hope it helps. i started recording, started your service and pressed the test audio button.

i also tried the two test versions, they both did not work, same behaviour as the original one :(

edit: aparantly i'm not allowed to post external links (or edit my post for 5 minutes). i've attached the logcat output

Hey sebistan, thanks A LOT for your logcat. I saw an error about a missing BROADCAST_STICKY permission. I've create a new version AudioBT-Sticky at the same link: https://docs.google.com/folder/d/0B2XwV7ab33OAY2tiVVRTWGRRTVE/edit?usp=sharing

Your help is a blessing. Now if that works, I'll be more than happy to give you the unlimited version if you send me your email address (in a private message).
 
  • Like
Reactions: RuggedHunter

sebistan

Member
Feb 9, 2013
6
5
yay, that would be great. unfortunately, it is still not working, but we are getting closer :)
when i start the new version, my car audio system switches briefly to calling mode and back to the tuner. But after that, all other sounds are still beeing routed to the standard speaker. I've attached the logcat
 

Attachments

  • 2013-02-11-09-12-09.txt
    45.5 KB · Views: 30
  • Like
Reactions: TurboLed

TurboLed

Senior Member
Mar 2, 2012
162
73
yay, that would be great. unfortunately, it is still not working, but we are getting closer :)
when i start the new version, my car audio system switches briefly to calling mode and back to the tuner. But after that, all other sounds are still beeing routed to the standard speaker. I've attached the logcat

There is something odd going on, now that it successfully go into communication mode, it cannot track the audio focus. Your phone/ROM is acting way differently than some others.
I've attempted a fix (AudioBT-focus.apk), please test. I turn off commuication mode between audio, however I fear that it will take too long to switch on and you will lose the first seconds of audio when a message is playing.
I believe the TTS should work (even without the fix above) as it doesn't use audio focus. You can test by playing the sample in the settings.

Thanks!
 
  • Like
Reactions: RuggedHunter

TurboLed

Senior Member
Mar 2, 2012
162
73
After looking at Android source code I figured out the focus problem was fixed in JB Android 4.1.1 and up, so anyone running my app with ICS have the same problem. If you have success with my fix above and you don't see a significant delay when playing the audio I could publish a new version with a workaround for ICS, otherwise I will have no other choice than to put a notice regarding incompatibility with ICS.
 

sebistan

Member
Feb 9, 2013
6
5
the fix also does not work, the audio test is still coming from the music channel. the tts-service is not working either. in none of the test versions. i guess i have to wait for the jb update.
 

TurboLed

Senior Member
Mar 2, 2012
162
73
the fix also does not work, the audio test is still coming from the music channel. the tts-service is not working either. in none of the test versions. i guess i have to wait for the jb update.

Please provide me with a logcat with the focus fix... There's probably something else going on. If you get the incoming call to come up during initialization, that's a good start.
 

sebistan

Member
Feb 9, 2013
6
5
sorry, i had a lot to do, could not make it any faster. Here is the logcat from my focus-fix-test, same procedure as last year :)
 

Attachments

  • 2013-02-12-19-11-10.txt
    48 KB · Views: 27
  • Like
Reactions: TurboLed

TurboLed

Senior Member
Mar 2, 2012
162
73
sorry, i had a lot to do, could not make it any faster. Here is the logcat from my focus-fix-test, same procedure as last year :)

Hi seb,
I finally decided to install ICS on my phone. And indeed, it doesn't work well. I see that I cannot prevent the call mode to steal the audio focus in this Android version. For now I don't have any idea out of my head.

However, TTS works on my phone with ICS but not with the fix version. Make sure you turn off the AudioBT service when testing TTS. And maybe send me a logcat while testing the TTS (playing the "Listen to an example" in the TTS settings).
 

bman12479

Member
Jul 12, 2010
32
0
Hi I just wanted to tell you that I recently bought a dice mediabridge for my car and the only issue I was having and it was really bothering me was that when I was in Sirius satellite mode and my phone connected through Bluetooth that the phone calls would come right through but not the navigation if in use.This bothered me because it was a lack of integration that should be there. I searched the web for a few weeks pretty thoroughly and discovered that this was a very common issue reported in threads but no solution at all from anyone.The other day I came across your app and it is wonderful it does exactly what I was looking for and I'm sure once word gets out it will get alot of downloads. My only issues with it is that it does seem a little buggy which I totally understand.A few times the other day it wouldn't activate and I had to reboot my phone to get it to work I have a Verizon note 2. And also a few times the audio just came through as static and not understandable but after playing with it got it to work again.Is development still being worked on for the app? Thanks again.
 

TurboLed

Senior Member
Mar 2, 2012
162
73
Is development still being worked on for the app? Thanks again.

Hi bman.
First thanks for your comments, those are always appreciated. I wrote the app for myself after knowing that some older non-Android phones and iPhone had this capability. Thanks to Android, the API allows to route audio through Bluetooth SCO although only in very recent versions of Android. Hopefully someday it will be better supported by the OS.
My app has an unexpected success since the beginning, however sales have decreased in the last few weeks. About half the people downloading the trial have ICS 4.0 which is not very well supported except for the TTS engine and nothing I can do to fix it yet.

I've pretty much stopped doing updates as the app has become stable enough on most devices; however I don't have much feedback from users and am not aware of all the bugs and if they are fixable. I'm still ready to publish fix whenever one is found.

Cheers!
 

Top Liked Posts

  • There are no posts matching your filters.
  • 18
    Hi

    I've created a small app that automatically switch your device into Bluetooth call mode when an app is playing an audio or when your GPS is giving directions. The benefit is that it will cut what you're currently listening from your car audio system to play the incoming call audio and go back to your current listening on your CD, MP3, FM radio, etc.

    There are two ways of using AudioBT.

    -One is a background service that monitors the audio focus and turn on the Bluetooth SCO proile when another app is temporarily requesting the audio focus. Unfortunately the first second of the audio might be cut when using this service (to be fixed with upcoming Xposed hook). Some applications do not request the audio focus properly so this might not always work.

    -The other approach is an integrated TTS engine. Any app using tne Android TTS service can use the AudioBT TTS service for sending text to speech. AudioBT will automatically turn on the Bluetooth SCO profile before playing the text. Any TTS service or language can be selected in the AudioBT TTS parameters.

    It is still experimental and user's feedback is appreciated.

    Thank you!





    https://play.google.com/store/apps/...51bGwsMSwxLDEsImNvbS50dXJib2xlZC5hdWRpb2J0Il0



    Service intents (for use with Tasker)

    com.turboled.audiobtplus.ON : Cat = Default, Target = Service. Turns ON the AudioBT Plus service.
    com.turboled.audiobtplus.OFF: Cat = Default, Target = Service. Turns OFF the AudioBT Plus service.
    com.turboled.audiobtplus.SCO_ENABLE : Cat = Default, Target = Service. Enables Bluetooth SCO channel audio.
    com.turboled.audiobtplus.SCO_DISABLE : Cat = Default, Target = Service. Disables Bluetooth SCO channel audio.
    com.turboled.audiobtplus.PLAY : Cat = Default, Mime Type = audio/*, Data = file uri (file:///*), Target = Service. Plays an audio file through the bluetooth channel. No need to call SCO_ENABLE or SCO_DISABLE. Specify file name in Data.

    To play notifications through Bluetooth with Tasker, create a new task with the following steps:
    -Say to file (Misc), text = %NTITLE, file = /sdcard/Download/1.wav. Use standard TTS engine (Pico, Google, SVox, etc...), EnhancedTTS or AudioBT+ TTS are not supported.
    -Send an intent (Misc), action = com.turboled.audiobtplus.PLAY, cat = Default, Mime type = audio/*, Data = file:///sdcard/download/1.wav, Target = Service.

    Add a new profile with Event -> UI -> Notification and link with the task created above.

    Add the task to any profile triggered on Notification *,*. Make sure Tasker is enabled in your Accessibility parameters.
    3
    I'm sorry people. I have a full-time job and I haven't spent much time on the app lately. I'm still planning to find a fix for the phone call issues this summer.
    Please note that any buyer can email me their transaction ID and I will issue a refund right away if not satisfied.
    Thanks for your patience.
    2

    Well, it was right there on the Google Play image... I added an hyperlink below.
    2
    Hi @TurboLed,

    Is it possible to make audiobt only push to the Bluetooth certain apps only? It messes with my wear device's voice recognition.

    I would like it to only push waze's commands, not other things like the phone beep sound when plugging the charger in, for example.

    Thanks!

    Sent from my LG-F460S
    2
    I thought these audio sources were different and thus, not mutually exclusive.
    The real problem is that Android has only one audio focus which is like a token that allows one and only one app to have at once. It is recommended for app developers to request the audio focus before playing sound or music to prevent having 2 apps playing at the same time. That's how the music pauses when you have a notifications for example.
    But you might find a streaming app that doesn't take the audio focus and it would probably work altough you might be hearing 2 sounds at the same time at some point.

    TurboLed, would you mind giving an answer to me as well ? I really would appreciate it very much !

    I didn't answer because I have no clue about what's causing your issues. The service should always stays on unless you turn it off manually. And since there's no crash I don't know what to look for...