My notification contains several buttons:
- 1 button launches the main action (when closing the status bar at the same time)
- 4 of them send pending intentions to control the music (should open the status bar)
The problem is that the first button does not close the status bar ...
PendingIntent sent by the first button:
Intent activityIntent = new Intent(smp, MusicShaker.class)
.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP
| Intent.FLAG_ACTIVITY_SINGLE_TOP);
activityIntent.setAction(MyIntentAction.DO_LAUNCH_ACTIVITY_FROM_NOTIF);
remoteViews.setOnClickPendingIntent(R.id.notif_album_IV, PendingIntent
.getActivity(ctxt, 0, activityIntent,
PendingIntent.FLAG_CANCEL_CURRENT));
activity starts correctly, but the status bar remains there and does not close.
I do not see / underestimate the flag? Can I close the status bar in the program from MyActivity.onResume ()?
editing: by the way, the notification is pressed by the service
thanks =)
elgui source
share