[MOD][XPOSED] SpotifyAVRCP - Bluetooth track info from Spotify

Search This thread

jbergler

Senior Member
Jan 18, 2011
55
32
SpotifyAVRCP:
Spotify doesn't send track information via bluetooth, in the past there have been patched versions of Spotify floating around to add media metadata over bluetooth. This is an xposed module that does the same thing, it hooks into an internal track change function and broadcasts a standard android media intent.

The Spotify APK is run through proguard so method names are likely to change - which means this may not work with all versions and future updates could break it - in which case I will try and fix asap and upload a new version.

Requirements:
1) Have Xposed Framework Installed

Instructions to install SpotifyAVRCP:
1) Download & Install SpotifyAVRCP from bintray or in the Xposed Installer Downloads section
2) Enable SpotifyAVRCP in Xposed Installer
3) Restart device
4) Play Music

Changelog
Latest: 1.0.0 Beta - 30/11/13 (Download)
  • Initial Release
  • Support for Spotify Version 0.7.3.636

Notes
It seems that this mod might only be useful for bluetooth info on android 4.2.x and below. 4.3 introduces AVRCP support and should handle things properly. However this mod might still be useful if you have other legacy applications which rely on the old broadcasts to get track information - this seems to be the case for both Pebble and Gear smartwatches.


If you're reporting problems, please include the Device, OS Version and end device you're trying to get to work.
 
Last edited:

ice_prophecy

Member
Nov 22, 2009
37
0
Brisbane
So just further feedback:

When I said it was working a treat, I only tested it on my Galaxy Gear (which displays Media Information) in the media control centre.

I tried it in my Toyota Altara S (2012) and the media head displays

(No Data) for each field.
 

jbergler

Senior Member
Jan 18, 2011
55
32
I tried it in my Toyota Altara S (2012) and the media head displays

(No Data) for each field.

Is there a media player which does work in your Toyota? If so, I can grab it and check which intents its sending. At the moment I'm sending the default android "com.android.music.metachanged" intent which, as far as I understand it, is what the os reads to generate the avrcp data.
 
  • Like
Reactions: ice_prophecy

ice_prophecy

Member
Nov 22, 2009
37
0
Brisbane
Is there a media player which does work in your Toyota? If so, I can grab it and check which intents its sending. At the moment I'm sending the default android "com.android.music.metachanged" intent which, as far as I understand it, is what the os reads to generate the avrcp data.

Yes, the default android music player. I'm running the stock Samsung TouchWiz ROM for Note 3 n9005:


Music 6.0.1
I've also attached the APK made from a TitaniumBackup View attachment com.sec.android.app.music-58e673dbcbf733750a580d16571af5d4.apk

I'll try re coupling the devices again in the meantime
 
Last edited:

ice_prophecy

Member
Nov 22, 2009
37
0
Brisbane
Out of curiosity does it support album art in the car? Or just to the gear?


Yes, when using the default music app:
I am able to see the album art and all tag information on both the Car and on the Galaxy Gear. (Edit: Give me 2 seconds to run out and double check)
I am only able to see tag information in the Car. The Gear however displays album art and tag information.

Annoyingly, the car will always autostart the Default Music app over Spotify.... it brings annoyance to no end...

There is one unrelated caveat, which is probably more related to the car's shortcomings is the lack of Unicode-8 for foreign characters. The Gear does not have this issue.
 
Last edited:

ice_prophecy

Member
Nov 22, 2009
37
0
Brisbane
As requested:
View attachment com.sec.android.app.music-5fa6d510e8cc2d8c98a6c1947cf90481.odex.gz

EDIT: I'm running a completely stock Samsung Note 3 Rom. I've only rooted it, but have never flashed any recovery/rom.
swF8dD7.jpg
 
Last edited:

Flaiker

Member
Jun 9, 2013
47
1
Not working for me either using Nexus 4 with 4.4. As soon as my device connects is says "Nexus 4" and after that it's just empty. If I launch Google Play music it is sending metadata perfectly and if I switch to Spotify after that Spotify is also sending it perfectly. I had this exact behaciour before installing your module or Metafy or the modified Spotify app.
I also tried disabling Google Play music but that doesnt seem to have any effect except for that I cannot use mentioned workaround anymore. If theres anything I can do to help please let me knoe.
 

jbergler

Senior Member
Jan 18, 2011
55
32
Not working for me either using Nexus 4 with 4.4. As soon as my device connects is says "Nexus 4" and after that it's just empty. If I launch Google Play music it is sending metadata perfectly and if I switch to Spotify after that Spotify is also sending it perfectly. I had this exact behaciour before installing your module or Metafy or the modified Spotify app.
I also tried disabling Google Play music but that doesnt seem to have any effect except for that I cannot use mentioned workaround anymore. If theres anything I can do to help please let me knoe.

So launching google play music means that spotify metadata comes through properly? Can you try and force stop google play music once the spotify metadata is working and see if it continues to work?
 

Flaiker

Member
Jun 9, 2013
47
1
So launching google play music means that spotify metadata comes through properly? Can you try and force stop google play music once the spotify metadata is working and see if it continues to work?

Sure. To clarify: Launch spotify -> play song -> no metadata -> launch gplay music -> start playing a song (will pause spotify) -> metadata of that song is dislayed -> switch back to spotify, unpause -> gplay music pauses -> metadata displayed is now the spotify song and will update accordingly when the song changes
Problem is that you need to do this trick again anytime you lose bluetooth connection.

-------------------------------

Tested it, still works after force closing play music and even deactivating it. It seems to me as if Google Play music initializes something that is necessary for metadata transfer.
 

jbergler

Senior Member
Jan 18, 2011
55
32
Tested it, still works after force closing play music and even deactivating it. It seems to me as if Google Play music initializes something that is necessary for metadata transfer.

Ok, thats super strange but at least it gives us something to work with. To clarify, what the xposed mod currently does is inject the metachanged intent so that a 'standard' intent shares the info systemwide - which seems to trigger things like smartwatches getting their metadata. I didn't realise the previous patches didn't quite achieve what it was described as.

I've just dredged through the spotify apk and as far as I can tell it initialises everything as it should. Admittedly the android docs on how this stuff is meant to work is rather vague.

Could you test a couple more scenarios for me?

What happens if you just open google play music but don't start playing - does Spotify still send the correct metadata then?
What about other media players, I think PowerAmp supports AVRCP these days, could you test it and see how the behaviour compares to Spotify / Google Play Music?
 

Flaiker

Member
Jun 9, 2013
47
1
Ok, thats super strange but at least it gives us something to work with. To clarify, what the xposed mod currently does is inject the metachanged intent so that a 'standard' intent shares the info systemwide - which seems to trigger things like smartwatches getting their metadata. I didn't realise the previous patches didn't quite achieve what it was described as.

I've just dredged through the spotify apk and as far as I can tell it initialises everything as it should. Admittedly the android docs on how this stuff is meant to work is rather vague.

Could you test a couple more scenarios for me?

What happens if you just open google play music but don't start playing - does Spotify still send the correct metadata then?
What about other media players, I think PowerAmp supports AVRCP these days, could you test it and see how the behaviour compares to Spotify / Google Play Music?

Just having Google Play Music open or starting it doesnt do anything. I need to start playing a song with it for any metdata transfer to work.
On PowerAmp I have exactly the same behaviour. Doesnt send anything until I play sth in Play music. I even switched some of the settings in the bluetooth section but couldnt get it to work on its own.

Surely the developers of popular music apps who have AVRCP functionality must know about this problem, in he other thread quite a few other people reported the same problematic I have.
 

jbergler

Senior Member
Jan 18, 2011
55
32
Just having Google Play Music open or starting it doesnt do anything. I need to start playing a song with it for any metdata transfer to work.
On PowerAmp I have exactly the same behaviour. Doesnt send anything until I play sth in Play music. I even switched some of the settings in the bluetooth section but couldnt get it to work on its own.

Surely the developers of popular music apps who have AVRCP functionality must know about this problem, in he other thread quite a few other people reported the same problematic I have.

One would assume so, I'll see what I can dig out of the google play music apk but so far its not obvious what might be causing the problem.
 

Flaiker

Member
Jun 9, 2013
47
1
One would assume so, I'll see what I can dig out of the google play music apk but so far its not obvious what might be causing the problem.

I've been trying to get this fixed for a while now. I even made a Tasker profile that would automate the play music trick but that didnt work all too well either.
If you saw the metafy app in the other thread, that doesnt work either for me, the problem seems to be sending metadata via bluetooth, completely unrelated to spotify. If you have anything you want to have tested that could help solving this please dont hesitate to ask me.
 

KePTeiN

Member
Dec 23, 2010
28
3
Don't work on 4.3 in my S4 neither (stock with root only)

Enviado desde mi GT-N8000 usando Tapatalk 4
 

gcgspain

Senior Member
Jan 12, 2009
226
46
Vigo
Not working on Xperia z 4.2 playing through car stereo Bluetooth. Walkman app works fine though.

Enviado desde mi C6603 mediante Tapatalk
 

blandreth94

Member
Jul 20, 2010
15
0
where i want
Works with note 3 and pebble!

Works GREAT with VZW Galaxy Note 3 (stock 4.3 MJ7) and Pebble's stock music controller! Thanks so much!!! Put up a beer link soon!
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 10
    SpotifyAVRCP:
    Spotify doesn't send track information via bluetooth, in the past there have been patched versions of Spotify floating around to add media metadata over bluetooth. This is an xposed module that does the same thing, it hooks into an internal track change function and broadcasts a standard android media intent.

    The Spotify APK is run through proguard so method names are likely to change - which means this may not work with all versions and future updates could break it - in which case I will try and fix asap and upload a new version.

    Requirements:
    1) Have Xposed Framework Installed

    Instructions to install SpotifyAVRCP:
    1) Download & Install SpotifyAVRCP from bintray or in the Xposed Installer Downloads section
    2) Enable SpotifyAVRCP in Xposed Installer
    3) Restart device
    4) Play Music

    Changelog
    Latest: 1.0.0 Beta - 30/11/13 (Download)
    • Initial Release
    • Support for Spotify Version 0.7.3.636

    Notes
    It seems that this mod might only be useful for bluetooth info on android 4.2.x and below. 4.3 introduces AVRCP support and should handle things properly. However this mod might still be useful if you have other legacy applications which rely on the old broadcasts to get track information - this seems to be the case for both Pebble and Gear smartwatches.


    If you're reporting problems, please include the Device, OS Version and end device you're trying to get to work.
    1
    Works a treat :D Now just the album art hahah!

    Show me where to deposit beer money for you?

    I'll get the album art working and then think about accepting beer money.
    1
    I tried it in my Toyota Altara S (2012) and the media head displays

    (No Data) for each field.

    Is there a media player which does work in your Toyota? If so, I can grab it and check which intents its sending. At the moment I'm sending the default android "com.android.music.metachanged" intent which, as far as I understand it, is what the os reads to generate the avrcp data.
    1
    Yes, the default android music player. I'm running the stock Samsung TouchWiz ROM for Note 3 n9005

    Out of curiosity does it support album art in the car? Or just to the gear?
    1
    Not working here either. Galaxy S4 4.3, Spotify version 0.7.8.566.

    EDIT: I found this which works with the current version of Spotify as a substitute for anyone who's still looking for a solution.
    http://xdaforums.com/showpost.php?p=47330636&postcount=260