AVRCP/A2DP - Send song title and artist via Bluetooth to Car Stereo LCD

Discussion in 'Tasker' started by MysticGolem, Jul 20, 2017.

  1. MysticGolem

    MysticGolem New Member

    Joined:
    Feb 26, 2016
    Messages:
    19
    Likes Received:
    0
    Greetings,
    I have been researching on the forums and online on how to send song information to my Car Stereo via Bluetooth.
    At the moment I would like to just try and send anything to my Car Stereo via Bluetooth. Like a simple "Hello World". From there we can build upon it.
    I am not sure if there's a Tasker function to do this or if AutoApps has a function to do this.
    Here's a link to some of the code we could use, but I am not sure how to implement any of it. I understand the code but I don't know how I could implement it using Tasker.
    https://stackoverflow.com/questions/15527614/send-track-informations-via-a2dp-avrcp
    Here's some code that looks pretty simple. I don't mind hard coding the values just to test it. But I don't know how to even implement such code in Tasker.
    Kindly advise and thanks in advance.
     
  2. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,237
    Likes Received:
    777
  3. MysticGolem

    MysticGolem New Member

    Joined:
    Feb 26, 2016
    Messages:
    19
    Likes Received:
    0
    Hi Joaomgcd,
    I currently have the AutoTools downloaded from the PlayStore from a few days ago. I am running the trial version for now.
    Did you just recently add that code in the dropbox link above?

    Also what function, task or event do I need to use in AutoTool to send text to my car stereo via Bluetooth?

    Thanks again in advance!
     
  4. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,237
    Likes Received:
    777
    Yeah, I added it today, just for you :)

    To use it check out the AutoTools AVRCP action in Tasker.
     
  5. MysticGolem

    MysticGolem New Member

    Joined:
    Feb 26, 2016
    Messages:
    19
    Likes Received:
    0
    Oh ok great thank you!
    I will download it right now.
     
  6. MysticGolem

    MysticGolem New Member

    Joined:
    Feb 26, 2016
    Messages:
    19
    Likes Received:
    0
    I've downloaded and I can see the AVRCP task.

    Plus I see there's no configuration required for the Profile.
    When I get a moment to go to my car I will definitely see if it works.

    Thanks again for your great support!
     
  7. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,237
    Likes Received:
    777
    Hmm, what do you mean there's no configuration required for the profile? :) You do have to input the track name, artist, etc, right?
     
  8. MysticGolem

    MysticGolem New Member

    Joined:
    Feb 26, 2016
    Messages:
    19
    Likes Received:
    0
    Sorry for the delayed response.
    I tried to create a profile with AVRCP, and it states no configuration is needed. I guess this is fine.

    I created a task that manually sets Track Name and Artists. This works and it sends it to my car Stereo.
    I will need more time to test this and see how I can use with my phone.
    Also I have noticed that sending an AVRCP using AutoTool requires there to be an audio stream already running in the Media stream. If not the AVRCP task will not do anything. I am guessing this is by design.

    Long story short, I've created a loop using Tasker while I'm in my car. I am using Media Button Events: Release and then Grab every 5 seconds. When I perform a Grab, sure Tasker is now able to intercept all Bluetooth buttons from my car, but it also removes any AVRCP commands, meaning I can't see the name of the song that is playing from my phone.

    I believe AutoInput works perfectly when I did a test...however AutoInput doesn't work when the screen is off. Whereas my Release and Grab code works when the screen is off.

    One of my most common Tasks I perform while driving is I would press the Next button 5 times on my car stereo, then my phone will start playing music from my favourite music app, Jango Radio. I do this while the phone is still in my pocket and while the screen is off. Unfortunately with the Media Grabs, I lose the song information that is sent to my car. So I was hoping sending the AVRCP commend from Tasker would solve that problem...it did partially.
     
  9. bgx

    bgx New Member

    Joined:
    Aug 25, 2015
    Messages:
    6
    Likes Received:
    0
    This works so great without losing the audio focus like in botifier. Thank you thousand times for this add on.
    Now I can display all stuff I want on my Mazda 3 display.
    For example I grab with autoinput the arrivaltime from my tomtom navi app and display it directly to my cardash. My handy is in the middleconsol and you can't see the display.
    Next thing I do is that I create my own submenus to start playlists in spotify and show it in dash.
    Thanks again
     
  10. jambrew

    jambrew New Member

    Joined:
    Jan 21, 2017
    Messages:
    1
    Likes Received:
    0
    Not working for me. :-(
    I see the minutes, seconds start to count like i had just started playing a song but the track, artist and album have the default "no data" text in my Lexus rx. Would be a really fun thing to play with...
     
  11. Sayan

    Sayan New Member

    Joined:
    Apr 1, 2020
    Messages:
    1
    Likes Received:
    0
    After creating the Intent as mentioned above how to pass it onto the car stereo so that the media info is displayed on the stereo LCD.

    Intent i = new Intent("com.android.music.metachanged")

    i.PutExtra("id", 0);
    i.PutExtra("artist", artist);
    i.PutExtra("album", album);
    i.PutExtra("track", title);
    i.PutExtra("playing", IsPlaying());
    i.PutExtra("ListSize", GetQueue());
    i.PutExtra("duration", GetDuration());
    i.PutExtra("position", position);
    context.SendBroadcast(i);

    I have tried with the above intent. But the car stereo display is looking like this https://drive.google.com/open?id=1A-RN8S1_fxzWbvQo4tIGsK4Vb2p_O9L2
     
    Last edited: Apr 1, 2020

Share This Page