Я хотел бы иметь возможность запустить уведомление, чтобы предупредить пользователей о таймере, который закончился, однако я не хочу иметь намерение при нажатии на уведомление.
Я пытался передать NULL для намерения
String ns = Context.NOTIFICATION_SERVICE;
NotificationManager mNotificationManager = (NotificationManager) context.getSystemService(ns);
int icon = R.drawable.icon;
CharSequence tickerText = "Hello";
long when = System.currentTimeMillis();
Notification notification = new Notification(icon, tickerText, when);
CharSequence contentTitle = "My notification";
CharSequence contentText = "Hello World!";
notification.setLatestEventInfo(context, contentTitle, contentText, null);
mNotificationManager.notify(HELLO_ID, notification);