builder = new NotificationCompat.Builder(Objects.requireNonNull(getContext()),"M_CH_ID");
builder.setSmallIcon(R.drawable.icon_notificacao)
.setContentTitle("RPfm 105.3")
.setContentText("Ao Vivo")
.setAutoCancel(true);
NotificationManager notifyManager = (NotificationManager) Objects.<FragmentActivity>requireNonNull(getActivity()).getSystemService(Context.NOTIFICATION_SERVICE);
if(notifyManager != null) {
notifyManager.notify(1, builder.build());
}
This code was working before updating android studio. Someone knows what it can be. In the Log not of the nda error, and already debuguei, it calls the method, but does not display the notification.