Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,739,099 Members 46,980 Now Online
XDA Developers Android and Mobile Development Forum

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

Tip us?
 
TurboLed
Old
(Last edited by TurboLed; 1st July 2013 at 04:30 PM.)
#1  
Member - OP
Thanks Meter 31
Posts: 83
Join Date: Mar 2012
Default [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!





https://play.google.com/store/apps/d...C5hdWRpb2J0Il0



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), 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.
The Following 4 Users Say Thank You to TurboLed For This Useful Post: [ Click to Expand ]
 
hoss_n2
Old
#2  
hoss_n2's Avatar
Senior Member
Thanks Meter 283
Posts: 3,231
Join Date: Nov 2008
Location: cairo
Default Re: [APP][4.0+] AudioBT: Use Bluetooth incoming call for GPS audio

Quote:
Originally Posted by TurboLed View Post
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
join us on Arab Xda members foundation

follow me on twitter Hoss for any updates

HTC HD2 --(Experience is our profession)--Galaxy Note 10.1
Galaxy tab 10.1


2012 Hoss_n2 Community . All rights reserved ,( Hoss_n2 and (Experience is our profession ) logos are trademarks of Hoss_n2 Community

if you like my work , tap thanks button
 
TurboLed
Old
#3  
Member - OP
Thanks Meter 31
Posts: 83
Join Date: Mar 2012
Quote:
Originally Posted by hoss_n2 View Post
Links please
Well, it was right there on the Google Play image... I added an hyperlink below.
The Following User Says Thank You to TurboLed For This Useful Post: [ Click to Expand ]
 
TurboLed
Old
#4  
Member - OP
Thanks Meter 31
Posts: 83
Join Date: Mar 2012
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
 
sebistan
Old
#5  
Junior Member
Thanks Meter 5
Posts: 6
Join Date: Feb 2013
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.
The Following User Says Thank You to sebistan For This Useful Post: [ Click to Expand ]
 
TurboLed
Old
#6  
Member - OP
Thanks Meter 31
Posts: 83
Join Date: Mar 2012
Quote:
Originally Posted by sebistan View Post
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
 
sebistan
Old
#7  
Junior Member
Thanks Meter 5
Posts: 6
Join Date: Feb 2013
i tried btmono yesterday, it works. I will get back to you with the logcat later
The Following User Says Thank You to sebistan For This Useful Post: [ Click to Expand ]
 
TurboLed
Old
#8  
Member - OP
Thanks Meter 31
Posts: 83
Join Date: Mar 2012
Quote:
Originally Posted by sebistan View Post
i tried btmono yesterday, it works. I will get back to you with the logcat later
At the same time, you could try 2 test versions I created. The first one adds more permissions (Bluetooth_admin and network_access). The second one use Call mode instead of Communiation mode. Please tell me if one of these works on your device.

Here's the link to both APK:
https://docs.google.com/folder/d/0B2...it?usp=sharing
 
sebistan
Old
(Last edited by sebistan; 10th February 2013 at 06:34 PM.)
#9  
Junior Member
Thanks Meter 5
Posts: 6
Join Date: Feb 2013
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
Attached Files
File Type: txt 2013-02-10-18-59-22.txt - [Click for QR Code] (50.4 KB, 30 views)
The Following User Says Thank You to sebistan For This Useful Post: [ Click to Expand ]
 
TurboLed
Old
(Last edited by TurboLed; 10th February 2013 at 06:37 PM.)
#10  
Member - OP
Thanks Meter 31
Posts: 83
Join Date: Mar 2012
Quote:
Originally Posted by sebistan View Post
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

Tags
bluetooth gps audio car navigation
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes