No longer creating a new instance of the app when clicking the notification. Also the widget will still stay clickable after a reboot.
This commit is contained in:
parent
1987bedaba
commit
88a86312a1
4 changed files with 17 additions and 8 deletions
|
|
@ -374,4 +374,8 @@ public class MusicPlayerRemote {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static boolean isServiceAvailable() {
|
||||
return musicService != null;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -113,7 +113,8 @@ public class PlayingNotificationHelper {
|
|||
|
||||
private PendingIntent getOpenMusicControllerPendingIntent() {
|
||||
Intent intent = new Intent(service, MainActivity.class);
|
||||
return PendingIntent.getActivity(service, 0, intent, 0);
|
||||
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);
|
||||
return PendingIntent.getActivity(service, 0, intent, PendingIntent.FLAG_UPDATE_CURRENT);
|
||||
}
|
||||
|
||||
private void setUpExpandedPlaybackActions() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue