Commit b154f549 authored by Edward Wang's avatar Edward Wang
Browse files

Fix click on notification

parent f983438e
...@@ -588,8 +588,8 @@ public class AudioService extends Service { ...@@ -588,8 +588,8 @@ public class AudioService extends Service {
.setAutoCancel(false) .setAutoCancel(false)
.setOngoing(true); .setOngoing(true);
Intent notificationIntent = new Intent(this, AudioPlayerFragment.class); Intent notificationIntent = new Intent(this, MainActivity.class);
notificationIntent.setAction(Intent.ACTION_MAIN); notificationIntent.setAction(MainActivity.ACTION_SHOW_PLAYER);
notificationIntent.addCategory(Intent.CATEGORY_LAUNCHER); notificationIntent.addCategory(Intent.CATEGORY_LAUNCHER);
notificationIntent.putExtra(START_FROM_NOTIFICATION, true); notificationIntent.putExtra(START_FROM_NOTIFICATION, true);
PendingIntent pendingIntent = PendingIntent.getActivity(this, 0, notificationIntent, PendingIntent.FLAG_UPDATE_CURRENT); PendingIntent pendingIntent = PendingIntent.getActivity(this, 0, notificationIntent, PendingIntent.FLAG_UPDATE_CURRENT);
......
...@@ -263,6 +263,7 @@ public class MainActivity extends SherlockFragmentActivity { ...@@ -263,6 +263,7 @@ public class MainActivity extends SherlockFragmentActivity {
filter.addAction(ACTION_SHOW_PROGRESSBAR); filter.addAction(ACTION_SHOW_PROGRESSBAR);
filter.addAction(ACTION_HIDE_PROGRESSBAR); filter.addAction(ACTION_HIDE_PROGRESSBAR);
filter.addAction(ACTION_SHOW_TEXTINFO); filter.addAction(ACTION_SHOW_TEXTINFO);
filter.addAction(ACTION_SHOW_PLAYER);
registerReceiver(messageReceiver, filter); registerReceiver(messageReceiver, filter);
/* Reload the latest preferences */ /* Reload the latest preferences */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment