My notification contains several buttons :
- 1 button launch back the main activity (should close status bar when doing so)
- 4 of them send pending intents to control the music (should keep status bar open)
The problem is, the first button does not close the status bar...
the 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));
the activity is correctly launched, but the status bar stays there and does not close itself.
Am I missing/misunderstanding a flag ? can I close the status bar progamaticaly from MyActivity.onResume() ?
edit: by the way, the notification is pushed by a service
thanks =)