[Android] Fix click on notification

Edward Wang git at videolan.org
Mon Sep 9 21:18:20 CEST 2013


vlc-ports/android | branch: master | Edward Wang <edward.c.wang at compdigitec.com> | Sun Sep  8 20:24:03 2013 -0400| [b154f5494dcf5ea287f1c23f1694703b6c23ed5c] | committer: Edward Wang

Fix click on notification

> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=b154f5494dcf5ea287f1c23f1694703b6c23ed5c
---

 vlc-android/src/org/videolan/vlc/AudioService.java     |    4 ++--
 vlc-android/src/org/videolan/vlc/gui/MainActivity.java |    1 +
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/vlc-android/src/org/videolan/vlc/AudioService.java b/vlc-android/src/org/videolan/vlc/AudioService.java
index 21fa230..f072edf 100644
--- a/vlc-android/src/org/videolan/vlc/AudioService.java
+++ b/vlc-android/src/org/videolan/vlc/AudioService.java
@@ -588,8 +588,8 @@ public class AudioService extends Service {
                 .setAutoCancel(false)
                 .setOngoing(true);
 
-            Intent notificationIntent = new Intent(this, AudioPlayerFragment.class);
-            notificationIntent.setAction(Intent.ACTION_MAIN);
+            Intent notificationIntent = new Intent(this, MainActivity.class);
+            notificationIntent.setAction(MainActivity.ACTION_SHOW_PLAYER);
             notificationIntent.addCategory(Intent.CATEGORY_LAUNCHER);
             notificationIntent.putExtra(START_FROM_NOTIFICATION, true);
             PendingIntent pendingIntent = PendingIntent.getActivity(this, 0, notificationIntent, PendingIntent.FLAG_UPDATE_CURRENT);
diff --git a/vlc-android/src/org/videolan/vlc/gui/MainActivity.java b/vlc-android/src/org/videolan/vlc/gui/MainActivity.java
index 23b524b..0bc69ba 100644
--- a/vlc-android/src/org/videolan/vlc/gui/MainActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/MainActivity.java
@@ -263,6 +263,7 @@ public class MainActivity extends SherlockFragmentActivity {
         filter.addAction(ACTION_SHOW_PROGRESSBAR);
         filter.addAction(ACTION_HIDE_PROGRESSBAR);
         filter.addAction(ACTION_SHOW_TEXTINFO);
+        filter.addAction(ACTION_SHOW_PLAYER);
         registerReceiver(messageReceiver, filter);
 
         /* Reload the latest preferences */



More information about the Android mailing list