Skip to content Skip to sidebar Skip to footer

Android Mediastyle Notificationcompat Displays 3 Actions Maximum

I have 2 problems with my NotificationCompat.Builder set up as MediaStyle : 1) I set up 5 actions and only 3 are displayed in the expanded notification. (The first 3 displayed act

Solution 1:

I have found the reason for this problem. I used the v4 appcompat support library instead of the v7

So replacing :

import android.support.v4.app.NotificationCompat;

by :

import android.support.v7.app.NotificationCompat;

fixed the problem.

This also was the reason of another of my issues with the media style notification.

Solution 2:

Eugen, please find the first action (the others are similar) :

previousPI = PendingIntent.getBroadcast(context, 100, new Intent(TOOLS_CONST.ACTION_PREVIOUS), 0);previousAction = new NotificationCompat.Action.Builder(R.drawable.ic_action_previous_light, null, previousPI).build();

Post a Comment for "Android Mediastyle Notificationcompat Displays 3 Actions Maximum"