Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MediaService: Add Poweramp handling for media controls #59

Merged
merged 2 commits into from Oct 21, 2018

Conversation

Myself5
Copy link
Contributor

@Myself5 Myself5 commented Oct 19, 2018

  • To allow simultaneous usage we store the current MediaController in a Preference and send commands based on that.

I'll rebase this PR on top of master after #58 has been merged

* Imported from https://github.com/maxmpz/powerampapi with the head of maxmpz/powerampapi/e743666ca1b677b1edd095e327dc3e8f5ea322dc
* Remove all examples and uneeded code as we only require the Player handling
* Keep PowerampAPI and PowerampAPIHelper in tact for easier updates
Copy link
Member

@FlorentRevest FlorentRevest left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Err, it's killing me that we have to introduce this kind of workaround for apps that don't know how to behave properly. However, even if I don't like the solution, I think it's necessary to solve that problem.
I just had a couple of questions to ask but after you answer them I'm willing to merge this.

@@ -24,6 +24,8 @@ android {
main.res.srcDirs += 'src/main/lib/android-ripple-background/library/src/main/res/'
main.java.srcDirs += 'src/main/lib/material-intro-screen/material-intro-screen/src/main/java/'
main.res.srcDirs += 'src/main/lib/material-intro-screen/material-intro-screen/src/main/res/'
main.java.srcDirs += 'src/main/lib/powerampapi/poweramp_api_lib/src/'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there really no other way to import that lib ? (maybe from a maven repository or something, I don't know)
I would rather only use that kind of import as a last resort. It's always a pain to maintain

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wasn't seeing a maven/gradle option right away so I just went with the way you used before and called it a day. Will do some more research if it's possible via dependencies.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So it appears that Poweramp has no grade or maven plugins published, so I guess this is the way to go for now. As the API is only used for the basic media controls and we don't use the advanced ones (like media info or album covers) I don't worry too much about it being outdated.

@Myself5
Copy link
Contributor Author

Myself5 commented Oct 20, 2018

I agree that this really shouldn't be necessary as Poweramp should provide support for the generic API but I guess for now this is what we need to deal with.

I'll take care of the notes tomorrow.

* To allow simultaneous usage we store the current MediaController in a Preference and send commands based on that.
@FlorentRevest
Copy link
Member

Thanks again @Myself5 ! :)

@FlorentRevest FlorentRevest merged commit a13dfb1 into AsteroidOS:master Oct 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants