AutoVoice Intercept Bluetooth button (usually assigned to redial)

Discussion in 'AutoApps' started by Daniel D, Feb 8, 2016.

  1. Daniel D

    Daniel D Member

    Joined:
    Feb 11, 2015
    Messages:
    127
    Likes Received:
    11
    Back to my voice controlled car...
    Giving that the head unit is of a low end type, it only gives me one button press, and this one triggers the redial of the last called number.
    I've tried to intercept this button press with AutoVoice both from the head unit and from a Bluetooth headset that I have, but it doesn't react to it. The only thing that worked was an application (Smart Bluetooth Headset) that circumvent the call, but not in an elegant way.
    Now.. Question is, can I somehow intercept this button press with AutoVoice in a nice way that skips calling altogether?

    Thanks!

    PS: I'm using a Nexus 5 with CM13.

    Sent from my Nexus 5 using Tapatalk
     
  2. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,481
    Likes Received:
    806
    I don't think you can sorry... Maybe with AutoInput? Can you check if it shows up in the AutoInput logs when you press it?
     
  3. Daniel D

    Daniel D Member

    Joined:
    Feb 11, 2015
    Messages:
    127
    Likes Received:
    11
    It doesn't show in the AutoInput logs. Looks like it is intercepted directly by Android and redirected directly to phone app, without leaving any trace in the system.

    Sent from my Nexus 5 using Tapatalk
     
  4. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,481
    Likes Received:
    806
    Sorry, don't think there's much I can do then... :( Wish I could help
     
  5. MysticGolem

    MysticGolem New Member

    Joined:
    Feb 26, 2016
    Messages:
    19
    Likes Received:
    0
    The short answer is Yes you can intercept media controls with Tasker and then utilize Autovoice.
    I am already doing this with my Toyota Corolla that has Bluetooth in the car (deck/stereo).
    From my testing here are the requirements, Android 4.4 and below works very well.
    Android 5.0 and above, things break as soon as you play music via any app like Spotify, Jango, Play Music.

    The concept I use is fairly simple but a lot of work to program in Tasker.

    Part 1: Media grabs/release
    When I get into my car and Bluetooth connects to my car "Media Car", Tasker will automatically trigger my MediaGrab loop and it will run every 4 seconds. This allows me to use my car buttons (Previous and Next) to control my phone via Tasker.

    You will need to test on when to Grab and Release. A Media Grab means Tasker will intercept the request and you can run own own code. A Media release mean give up Tasker's power and give it back to Android.

    Part 2: Simple example
    If I press the Previous button on my, Autovoice Continuous will start (5 second beeps) and I have time to talk to my car with a profile I've set in Tasker. For example "Drive Home", this will open Google Maps, enter my home address and start Navigation. Then Autovoice Continuous will stop.

    Part 3: Complex example
    Here are my commands I am using with my car.
    Previous button on my car = 1 = Enable AutoVoice Continuous
    Previous button on my car > 1 = Open Google Maps
    Next button on my car = 1 = Next track on any music application like (Jango, Spotify, Play Music)
    Next button on my car > 1 = Open Jango radio and play the first station
    In between commands I have 300 milliseconds to press the buttons on my car to get a corresponding trigger.
    Yes I do make mistakes but it's not a problem, just try again.

    Part 4: Phone vs Car
    This solution I came up with uses the physical buttons of my car to activate things on my phone, which then play through the audio system of my car. However if my phone is in my pocket and I use AutoVoice Continuous, I have to speak loudly for my phone's mic to hear me speak to it. My car has a mic above my head when I am doing a voice call, I haven't figured out how to activate when using Autovoice Continuous (may not be possible).


    I hope this helps.
     
  6. Daniel D

    Daniel D Member

    Joined:
    Feb 11, 2015
    Messages:
    127
    Likes Received:
    11
    MysticGolem, you don't have to answer me in two places with stuff that has nothing to do with what I asked.
    For your information, I was asking about the redial command, which has nothing to do with the media commands.
    Thanks anyway!
     
  7. vicky lahkar

    vicky lahkar New Member

    Joined:
    May 20, 2016
    Messages:
    2
    Likes Received:
    0
    Old post but I found a solution to it, sparingly.
    My BT headset also has a single button; single press to end call and long press to dial last dialed number.
    Tasker > events > Autovoice > When BT button pressed>>>> Task: I exit the Autovoice menu by using the input back button twice followed by the task I want.
    Hope this can help.
     

Share This Page