summaryrefslogtreecommitdiffstats
path: root/android/src/org/rockbox/Helper
diff options
context:
space:
mode:
authorAntoine Cellerier <dionoea@videolan.org>2011-01-29 20:47:32 +0000
committerAntoine Cellerier <dionoea@videolan.org>2011-01-29 20:47:32 +0000
commitc0c769c5a86c56c2ab2c9e88515a64da98575182 (patch)
tree24e84b2d146bf3da39d93983d5656061e3c88ecb /android/src/org/rockbox/Helper
parente9749d1b93f23b3bc36305ad1d39ca5e5c0cb3a8 (diff)
downloadrockbox-c0c769c5a86c56c2ab2c9e88515a64da98575182.tar.gz
rockbox-c0c769c5a86c56c2ab2c9e88515a64da98575182.zip
Add widgets to android port.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29170 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'android/src/org/rockbox/Helper')
-rw-r--r--android/src/org/rockbox/Helper/RunForegroundManager.java14
1 files changed, 14 insertions, 0 deletions
diff --git a/android/src/org/rockbox/Helper/RunForegroundManager.java b/android/src/org/rockbox/Helper/RunForegroundManager.java
index 6c5f2deb14..99ac66b686 100644
--- a/android/src/org/rockbox/Helper/RunForegroundManager.java
+++ b/android/src/org/rockbox/Helper/RunForegroundManager.java
@@ -11,6 +11,7 @@ import android.app.NotificationManager;
import android.app.PendingIntent;
import android.app.Service;
import android.content.Intent;
+import android.net.Uri;
import android.util.Log;
import android.widget.RemoteViews;
@@ -92,6 +93,19 @@ public class RunForegroundManager
else
mNotification.tickerText = title+" - "+artist;
mNM.notify(R.string.notification, mNotification);
+
+ Intent widgetUpdate = new Intent("org.rockbox.TrackUpdateInfo");
+ widgetUpdate.putExtra("title", title);
+ widgetUpdate.putExtra("artist", artist);
+ widgetUpdate.putExtra("album", album);
+ mCurrentService.sendBroadcast(widgetUpdate);
+ }
+
+ public void finishNotification()
+ {
+ Log.d("Rockbox", "TrackFinish");
+ Intent widgetUpdate = new Intent("org.rockbox.TrackFinish");
+ mCurrentService.sendBroadcast(widgetUpdate);
}
private interface IRunForeground