diff options
author | Scott Jackson <daneren2005@gmail.com> | 2012-08-27 21:56:50 -0700 |
---|---|---|
committer | Scott Jackson <daneren2005@gmail.com> | 2012-08-27 21:56:50 -0700 |
commit | 872079336f31cf129ce32b7df14adc1ea87d84de (patch) | |
tree | ed743d3dba5ad25a2268621c695d341ef93c6f93 /subsonic-android/src/github/daneren2005 | |
parent | b0d987b315bbb0b8b72bf85493b6a7220bcedd76 (diff) | |
download | dsub-872079336f31cf129ce32b7df14adc1ea87d84de.tar.gz dsub-872079336f31cf129ce32b7df14adc1ea87d84de.tar.bz2 dsub-872079336f31cf129ce32b7df14adc1ea87d84de.zip |
Fix for notifications not doing correct action
Diffstat (limited to 'subsonic-android/src/github/daneren2005')
-rw-r--r-- | subsonic-android/src/github/daneren2005/dsub/util/Util.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/subsonic-android/src/github/daneren2005/dsub/util/Util.java b/subsonic-android/src/github/daneren2005/dsub/util/Util.java index cd91af3c..53b3d225 100644 --- a/subsonic-android/src/github/daneren2005/dsub/util/Util.java +++ b/subsonic-android/src/github/daneren2005/dsub/util/Util.java @@ -615,19 +615,19 @@ public final class Util { // Create actions for media buttons PendingIntent pendingIntent; - Intent prevIntent = new Intent("1"); + Intent prevIntent = new Intent("KEYCODE_MEDIA_PREVIOUS"); prevIntent.setComponent(new ComponentName(context, DownloadServiceImpl.class)); prevIntent.putExtra(Intent.EXTRA_KEY_EVENT, new KeyEvent(KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_MEDIA_PREVIOUS)); pendingIntent = PendingIntent.getService(context, 0, prevIntent, 0); contentView.setOnClickPendingIntent(R.id.control_previous, pendingIntent); - Intent pauseIntent = new Intent("2"); + Intent pauseIntent = new Intent("KEYCODE_MEDIA_PLAY_PAUSE"); pauseIntent.setComponent(new ComponentName(context, DownloadServiceImpl.class)); pauseIntent.putExtra(Intent.EXTRA_KEY_EVENT, new KeyEvent(KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_MEDIA_PLAY_PAUSE)); pendingIntent = PendingIntent.getService(context, 0, pauseIntent, 0); contentView.setOnClickPendingIntent(R.id.control_pause, pendingIntent); - Intent nextIntent = new Intent("3"); + Intent nextIntent = new Intent("KEYCODE_MEDIA_NEXT"); nextIntent.setComponent(new ComponentName(context, DownloadServiceImpl.class)); nextIntent.putExtra(Intent.EXTRA_KEY_EVENT, new KeyEvent(KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_MEDIA_NEXT)); pendingIntent = PendingIntent.getService(context, 0, nextIntent, 0); |