我想在定义的时间显示通知。我用" setWhen()"。但是setWhen()的任何参数都会忽略,并且通知会立即显示。我做错了什么?我的代码:
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());