forked from len0rd/rockbox
Add widgets to android port.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29170 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
e9749d1b93
commit
c0c769c5a8
37 changed files with 771 additions and 5 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue