定義した時刻に通知を表示したい。私は "setWhen()"を使用します。しかし、setWhen()の引数は無視され、通知は常に瞬時に表示されます。私が間違ったことは?私のコード:NotificationCompat一度に
NotificationCompat.Builder mBuilder =
new NotificationCompat.Builder(this)
.setWhen(???)
.setSmallIcon(R.drawable.app_icon)
.setContentTitle("Test")
.setContentText("Test");
Intent resultIntent = new Intent(this, MainActivity.class);
NotificationManager mNotificationManager =
(NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
mNotificationManager.notify(1, mBuilder.build());
私の質問とその答えを見てください。私は今日それを修正した。 [BroadcastReceiverとAlarmManagerを使用して特定の時刻に通知する](https://stackoverflow.com/questions/47420667/notification-at-specific-time-using-broadcastreceiver-and-alarmmanager) –