I have got a notification with buttons on it and these buttons modify the notification interface when the user clicks on one of them.
The notification interface updates properly but...the main activity of my app is also brought to front.
How to avoid bringing the app to front?
Thanks !!!
Found the solution !
The intent of the notification has to fire a service and not an activity.
Intent buttonsIntent = new Intent(this, NotificationManagementService.class);
buttonsIntent.putExtra("do_action", action);
contentView.setOnClickPendingIntent(R.id.notifButton, PendingIntent.getActivity(this, 0, buttonsIntent, PendingIntent.FLAG_UPDATE_CURRENT));
notification.contentView = contentView;
mNotificationManager.notify(1, notification);