Say the name of the caller via Bluetooth headset... is it possible?

1,579 views
Skip to first unread message

Martín Alejandro Gomez

unread,
May 23, 2011, 4:58:32 PM5/23/11
to Tasker
Hey there,

I set up a profile to read the name of the caller according to what
Pen said here (http://groups.google.com/group/tasker/browse_thread/
thread/57fcf5609ea50464/203c88c9ae801210?
lnk=gst&q=caller#203c88c9ae801210), and it works because the
speakerphone says it loud, but the thing is that the bluetooth headset
only plays a default "beep", even though I've tried the ringer, media
and call streams.

My guess is that when in a call, the BT headset gets the signal that a
call is being made and it plays the default ringer it has - hence it
doesn't pick up any string. But on the other hand, I've read that some
apps in the market (like TalkToMe) say that they support BT headset
(haven't tried them yet; I'd much rather solve it using Tasker!)

Any ideas would be very helpful. Thanks!

BossMan

unread,
May 23, 2011, 6:25:33 PM5/23/11
to Tasker
Is your headset tied to media stream as well (check bt settings)?

BR,
A.

On 23 Maj, 22:58, Martín Alejandro Gomez <martingomez...@gmail.com>
wrote:

Martín Alejandro Gomez

unread,
May 23, 2011, 8:32:46 PM5/23/11
to Tasker
Mmm... I think so, it's an A2DP that's using the audio profile +
headset profile at the time of the call. Was that what you meant?

Thanks

Pent

unread,
May 24, 2011, 3:41:58 AM5/24/11
to Tasker
> Mmm... I think so, it's an A2DP that's using the audio profile +
> headset profile at the time of the call. Was that what you meant?

I don't much understand this BT stuff, but have you tried the
Bluetooth Voice
action in the new beta ?

Pent

BossMan

unread,
May 24, 2011, 4:56:52 AM5/24/11
to Tasker
Yes, this is what I meant :)

BR,
A.

On May 24, 2:32 am, Martín Alejandro Gomez <martingomez...@gmail.com>

Martín Alejandro Gomez

unread,
May 24, 2011, 9:47:10 AM5/24/11
to Tasker
@Pent: haven't seen it until you told me, but isn't that supposed to
send voice commands to the phone via the headset? That's not what I
want to achieve; I want for the phone to read the caller name to the
headset.

@BossMan: so... any ideas? :)

chip

unread,
May 24, 2011, 5:36:45 PM5/24/11
to Tasker
I couldn't work the link you posted but what you're trying to do
should work problem free.
I'd gues that the link tells you to
create a "speak caller" profile with an event based trigger - phone
ringing.
with a "say" task with the value %CNAME.

You then create a bluetooth connected profile for your specific
headset and use this profile to activate and deactivate the "speak
caller" profile.

Am I right? This works fine on my HTC Desire. I'm on Cyanogen mod. In
Cyanogen settings I can set notifications alarms and/or ringtones to
"always play through speaker but not the other way around so I presume
the default is to play through headset. I would try the notification
stream first as I know media stream can get attenuated when a call/
notification happens. Have a root around in the phones settings if
this is no help.


On May 23, 9:58 pm, Martín Alejandro Gomez <martingomez...@gmail.com>
wrote:

BossMan

unread,
May 25, 2011, 7:05:41 AM5/25/11
to Tasker
I spent some time yesterday with my BT headset trying to solve your
issue and unfortunatelly, I haven't found any solution. What I noticed
tough is, when a phone is ringing and you hear the "ringtone" in the
headset, you can disconnect the device from the HSP (Phone) profile
(leaving Media/A2DP only) and this way you can hear the "say" action
going through. Once you enable the HSP profile again, the "ringtone"
is heard again and you can no longer hear A2DP.

From what I read in the net, this is an expected behaviour, i.e. the
HSP profile suspends the A2DP. However, since these operations are
possible to execute via the UI, I guess it should be also possible to
code around them and make them accessible programatically (maybe
IBluetoothHeadset.aidl can be used:
http://code.google.com/p/auto-answer/source/browse/trunk/src/android/bluetooth/IBluetoothHeadset.aidl?)

BR,
A.

On May 24, 3:47 pm, Martín Alejandro Gomez <martingomez...@gmail.com>

BossMan

unread,
May 25, 2011, 7:28:20 AM5/25/11
to Tasker
Just checked the ConnectSpecificProfilesActivity class (this is the
one that handles preferences for particular bt device)
http://hi-android.info/src/com/android/settings/bluetooth/ConnectSpecificProfilesActivity.java.html

and I think it should be possible to implement adding some pieces
together:

mManager = LocalBluetoothManager.getInstance(this);
mCachedDevice =
mManager.getCachedDeviceManager().findDevice(device);
mCachedDevice.getConnectableProfiles()
if (checked) {
mCachedDevice.connect(profile);
} else {
mCachedDevice.disconnect(profile);
}

BR,
A.

On May 25, 1:05 pm, BossMan <adam.marynow...@gmail.com> wrote:
> I spent some time yesterday with my BT headset trying to solve your
> issue and unfortunatelly, I haven't found any solution. What I noticed
> tough is, when a phone is ringing and you hear the "ringtone" in the
> headset, you can disconnect the device from the HSP (Phone) profile
> (leaving Media/A2DP only) and this way you can hear the "say" action
> going through. Once you enable the HSP profile again, the "ringtone"
> is heard again and you can no longer hear A2DP.
>
> From what I read in the net, this is an expected behaviour, i.e. the
> HSP profile suspends the A2DP. However, since these operations are
> possible to execute via the UI, I guess it should be also possible to
> code around them and make them accessible programatically (maybe
> IBluetoothHeadset.aidl can be used:http://code.google.com/p/auto-answer/source/browse/trunk/src/android/...)

Pent

unread,
May 25, 2011, 8:46:12 AM5/25/11
to Tasker
Thanks for the research, I'll see if I can get anything useful out of
this on a rainy Sunday.

Pent

On May 25, 12:28 pm, BossMan <adam.marynow...@gmail.com> wrote:
> Just checked the ConnectSpecificProfilesActivity class (this is the
> one that handles preferences for particular bt device)http://hi-android.info/src/com/android/settings/bluetooth/ConnectSpec...

Martín Alejandro Gomez

unread,
May 26, 2011, 2:25:43 PM5/26/11
to Tasker
Yes, really, thanks for all your research on the topic BossMan! Hope
Pen would be able to achieve something with this info.

I wonder if the TalkToMe app that says "bluetooth headset support" is
doing something like that. Haven't tried it yet

Thanks

BossMan

unread,
May 26, 2011, 3:32:44 PM5/26/11
to Tasker
> I wonder if the TalkToMe app that says "bluetooth headset support" is
> doing something like that. Haven't tried it yet

I was curious enough to try it and guess what: it works! It does not
even interrupt ringing but it does play the contact name somehow. It
comes with Tasker plugin too (for config only though).
I wonder what is the trick for doing so :)

BR,
A.

On 26 Maj, 20:25, Martín Alejandro Gomez <martingomez...@gmail.com>

sayling

unread,
May 26, 2011, 5:37:56 PM5/26/11
to Tasker
That would be great

+1 from me :)
> > > > > > > > Any ideas would be very helpful. Thanks!- Hide quoted text -
>
> - Show quoted text -

BossMan

unread,
May 26, 2011, 6:50:36 PM5/26/11
to Tasker
Hi Pent,

don't spend too much time on this particular approach as it might be
not worth it ;) - based on that other app (TalkToMe) advertised by
Martin it seems that the more proper way is to use Sco sockets,
whatever they are ;) - at least this is what I think is happening
there, looking at the syslog. Here's a link with some potential hints
(though the solution described there is not successful afterall):
http://stackoverflow.com/questions/2144694/routing-audio-to-bluetooth-headset-non-a2dp-on-android

BR,
A.
> > > > > > > > Any ideas would be very helpful. Thanks!- Ukryj cytowany tekst -
>
> - Pokaż cytowany tekst -

Martín Alejandro Gomez

unread,
May 26, 2011, 10:50:20 PM5/26/11
to Tasker
Wow, you really got into this BossMan! Thanks for your help!!!

I haven't tried that other app, maybe it doesn't even work as it says,
but it would be awesome if this could be accomplished via Tasker,
although to be honest, I don't know how Pent could implement this HSP
toggling, but I'm hoping he would amaze me once again :)

Thanks to all

On May 26, 7:50 pm, BossMan <adam.marynow...@gmail.com> wrote:
> Hi Pent,
>
> don't spend too much time on this particular approach as it might be
> not worth it ;) - based on that other app (TalkToMe) advertised by
> Martin it seems that the more proper way is to use Sco sockets,
> whatever they are ;) - at least this is what I think is happening
> there, looking at the syslog. Here's a link with some potential hints
> (though the solution described there is not successful afterall):http://stackoverflow.com/questions/2144694/routing-audio-to-bluetooth...
Reply all
Reply to author
Forward
0 new messages