为什么Android 7.0(Nougat)中不显示通知文本

Mam*_*dal 7 android push-notification android-7.0-nougat

我正在notification我的应用程序中显示OS versions除了Android 7.0(Nougat)以外的所有工作正常.这是代码

  Intent notificationIntent = new Intent(context, HomeScreenActivity.class);

        // set intent so it does not start a new activity
        notificationIntent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP);

        PendingIntent intent = PendingIntent.getActivity(context, 0, new Intent(), PendingIntent.FLAG_UPDATE_CURRENT | Notification.FLAG_AUTO_CANCEL | Notification.FLAG_SHOW_LIGHTS);

        Notification.Builder builder = new Notification.Builder(context);
        builder.setContentIntent(intent)
                .setAutoCancel(true)
                .setPriority(Notification.PRIORITY_MAX)
                .setContentTitle(title)
                .setStyle(new Notification.BigTextStyle().bigText(message))
                .setContentText(message);
        if (Build.VERSION.SDK_INT >= 21)
            builder.setVibrate(new long[0]);

        notification.flags = Notification.DEFAULT_LIGHTS | Notification.FLAG_AUTO_CANCEL;
        if (android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP){
            builder.setColor(context.getResources().getColor(R.color.colorPrimary));
            builder.setSmallIcon(R.drawable.ic_nav_reward_point);
        }else{
            builder.setSmallIcon(R.drawable.launcher_icon);
        }
        builder.setAutoCancel(true);
        builder.setContentIntent(intent);
        notification.flags |= Notification.FLAG_AUTO_CANCEL;

        // Play default notification sound
        notification.defaults |= Notification.DEFAULT_SOUND;

         // Vibrate if vibrate is enabled
        notification.defaults |= Notification.DEFAULT_VIBRATE;

        notification = builder.build();
        notificationManager.notify(m, notification);
Run Code Online (Sandbox Code Playgroud)

Android 7.0我能够看到notification icon,标题,但它没有显示完整的通知文本.

有什么我想念的Android 7.0吗?任何帮助都会深深体会到.