Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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());
- }
Add Comment
Please, Sign In to add comment