This code is not generating the push.
// intent used to click on notification
Intent intent = new Intent(this, AdminMainActivity.class);
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
PendingIntent pendingIntent = PendingIntent.getActivity(this, 0 /* Request code */, intent,
PendingIntent.FLAG_ONE_SHOT);
// custom notification view RemoteViews contentView = new RemoteViews(getPackageName(), R.layout.custom_push); contentView.setImageViewResource(R.id.image, R.mipmap.ic_launcher); contentView.setTextViewText(R.id.title, "mSchooling"); contentView.setTextViewText(R.id.text, message); // notification code final String CHANNEL_ID = "channel_02"; NotificationManager mNotificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { NotificationChannel mChannel = new NotificationChannel(CHANNEL_ID, getString(R.string.app_name), NotificationManager.IMPORTANCE_DEFAULT); mNotificationManager.createNotificationChannel(mChannel); } NotificationCompat.Builder builder = new NotificationCompat.Builder(this); builder.setSmallIcon(R.mipmap.ic_launcher) .setLargeIcon(BitmapFactory.decodeResource(getResources(), R.mipmap.ic_launcher)) .setColor(Color.RED) .setSound(RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION)) .setContentTitle("mSchooling") .setContent(contentView) .setContentIntent(pendingIntent); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { builder.setChannelId(CHANNEL_ID); // Channel ID } builder.setAutoCancel(true); mNotificationManager.notify(1, builder.build());