プロジェクトのapiターゲットを27に更新し、すべての通知を無効にしました。
API 26と27の通知の違いは何ですか?通知チャンネルIDとは何ですか?通知はAPIで機能しません27
Notification notif = new NotificationCompat.Builder(this)
.setContentTitle(getString(R.string.app_name))
.setContentText(message)
.setSmallIcon(R.mipmap.ic_launcher)
.setContentIntent(pIntent)
.setSound(alarmSound)
.setAutoCancel(true).build();
notif.ledARGB = 0xFFff0000;
notif.flags = Notification.FLAG_SHOW_LIGHTS;
notif.ledOnMS = 100;
notif.ledOffMS = 100;
NotificationManager notificationCompatManager =
(NotificationManager) getSystemService(NOTIFICATION_SERVICE);
notificationCompatManager.notify(0, notif);
みんなええ、それをupvotedていますか?いいね。 –
https://stackoverflow.com/questions/46990995/on-android-8-oreo-api-26-and-later-notification-does-not-display –