Age | Commit message (Collapse) | Author |
|
Fixes the error:
IllegalStateException: Not allowed to start service Intent { cmp=org.musicpd/.Main (has extras) }: app is in background
|
|
|
|
release v0.21.22
|
|
Using MPD from Android since quite some times now. I consider it very stable
now.
|
|
This seems to be required on recent Android versions (tested with Android 10).
This is also required for android TV services (cf. next commit).
This is done using Java reflection so that the project doesn't depend on
android compat libs.
|
|
|
|
|
|
Using this API function requires SDK level 23.
|
|
|
|
MPD has minSdkVersion=21 which is above all the checks here.
|
|
|
|
add 2 preferences to:
- enable Wakelock when MPD is running (prevent suspend)
- run MPD on boot
and display MPD logs
|
|
- add Settings: Activity to start / stop MPD Service (Main).
- Main is a service that run in foreground with a notification. See
Service.startForeground documentation for more details.
- Main.Client is used to control the service: start or stop it and also receive
callbacks when service encounters an error, is killed, is started or is
stopped.
- Main.start to start the service without any fallback.
|
|
A Java object to send logs on the android side.
|
|
The number of MPD installs on Android < 5.0 is negligible, and that
API version introduces lots of useful features for MPD.
|
|
|
|
|
|
|
|
Break the mainloop and terminate run call.
|
|
Let the user know that MPD has failed. Not the best thing to do, but
better than pretending it still runs.
|
|
|
|
Add class Context which wraps the Android/Java Context class and add a
JNI wrapper for method Context.getCacheDir().
|
|
Finally, MPD runs on Android. For some small value of "runs". Very
much work left, too much to describe.
|