Skip to content
This repository has been archived by the owner on May 21, 2022. It is now read-only.

App-recognition for music players who identify as com.android.music #234

Merged
merged 1 commit into from
Jan 1, 2016

Conversation

Alia5
Copy link
Contributor

@Alia5 Alia5 commented Nov 28, 2015

A lot of Music-Players identify themselfs as the "generic android music player" and sending broadcasts with com.android.music.XXX intents
Scrobbling support in this case is implemented, but no "app recognition feature"
As some of theese music apps also include an extra String "scrobbling_source"
eg. bundle.putString("scrobbling_source", "com.examplecompany.exampleapp");
we can add App-recognition in case an app does exactly this.

…ame in a StringExtra "scrobbling_source" along with "com.android.music.XXX" intents
@Alia5
Copy link
Contributor Author

Alia5 commented Nov 28, 2015

In addition to that, i assume that, with another small code addition you should be able to filter out PowerAmps "vanilla android scrobbling" issue mentioned in #119 and #200, since its sending an extra "com.maxmpz.audioplayer.source"
This however, is untested. And thus not in this PR

@a-r-db
Copy link
Contributor

a-r-db commented Jan 1, 2016

Hi @Alia5 very great work.
Could I ask what music apps you tested this with?
I will test this some tonight, but the code looks like it shouldn't cause any problems.
I will commit it tonight or tomorrow hopefully and then make all the file changes for the Apache licensing.
Thanks. Happy New Year.

a-r-db pushed a commit that referenced this pull request Jan 1, 2016
App-recognition for music players who identify as com.android.music
@a-r-db a-r-db merged commit d5898b8 into simple-last-fm-scrobbler:master Jan 1, 2016
@Alia5 Alia5 deleted the dev branch January 1, 2016 19:19
@Alia5 Alia5 restored the dev branch January 1, 2016 19:25
@inverse
Copy link
Contributor

inverse commented Jan 2, 2016

Oh nice 👍

@Alia5
Copy link
Contributor Author

Alia5 commented Jan 3, 2016

I did see this here, and wondered why you guys don't do the same

the action "com.android.music.xxxxxxxchanged" corresponds to the same action that is used by default on Android; rather than creating a custom action for every player, it is better to stick to this one
as a consequence to the first note, the "scrobbling_source" extra is used to identify the source application (i.e., your app)

Since it was super quick and easy to implement to implement I made this PR

I didn't go too in depth in checking, since I am developing my own media app currently, which may or may not see the light of the public...

Pretty much every app that broadcasts the "scrobbling_source" extra for musixmatches floating lyrics should work with this.

I know it doesn't interfere with anything, that's what I did properly check at least.

Spotify is also working flawless with this. I dont get anything reported in #223 but I'm not sure if the issues existed for me beforehand.
Spotyfy afaik sends the "source" extra btw, according to musixmatch.

As for apps which doesn't have their own dedicated broadcast-receiver i know that shuttle works.

I finally checked with poweramp.
"Scroble via Offical Last.fm app" doesn't get app recognition, but as stated in my comment this would need to check for "com.maxmpz.audioplayer.source"
Should be super quick too, maybe I can check this when I find some spare time.
Android WAIL app, which seems to be discontinued, does exactly this

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants