forked from MusicPlayerDaemon/MPD
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- 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.
- Loading branch information
1 parent
aff070b
commit 54a5491
Showing
9 changed files
with
592 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:id="@+id/layout" | ||
android:layout_width="fill_parent" | ||
android:layout_height="fill_parent" | ||
android:padding="10dp" > | ||
<ImageView android:id="@+id/image" | ||
android:layout_width="wrap_content" | ||
android:layout_height="fill_parent" | ||
android:layout_alignParentLeft="true" | ||
android:layout_marginRight="10dp" /> | ||
<TextView android:id="@+id/title" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:layout_toRightOf="@id/image" | ||
style="Custom Notification Title" /> | ||
<TextView android:id="@+id/text" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:layout_toRightOf="@id/image" | ||
android:layout_below="@id/title" | ||
style="Custom Notification Text" /> | ||
</RelativeLayout> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package org.musicpd; | ||
import org.musicpd.IMainCallback; | ||
|
||
interface IMain | ||
{ | ||
void start(); | ||
void stop(); | ||
void setWakelockEnabled(boolean enabled); | ||
boolean isRunning(); | ||
void registerCallback(IMainCallback cb); | ||
void unregisterCallback(IMainCallback cb); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package org.musicpd; | ||
|
||
interface IMainCallback | ||
{ | ||
void onStarted(); | ||
void onStopped(); | ||
void onError(String error); | ||
void onLog(int priority, String msg); | ||
} |
Oops, something went wrong.