private Notification buildNotification() { NotificationCompat.Builder builder = new NotificationCompat.Builder(context) .setCategory(NotificationCompat.CATEGORY_EVENT) .setVisibility(NotificationCompat.VISIBILITY_PRIVATE) // default .setContentTitle(title) .setContentText(shortText) .setStyle(new NotificationCompat.BigTextStyle().bigText(fullText)) .setSmallIcon(R.drawable.ic_stat_notification) .setColor(context.getResources().getColor(R.color.my_color)) .setContentIntent(intent); // show all the above in public contexts builder.setPublicVersion(builder.build()); // only show actions when unlocked builder.addAction(R.drawable.ic_action, context.getString(R.string.action), actionIntent); return builder.build(); }