本地通知即时触发

时间:2015-05-28 16:05:14

标签: android notifications

你知道你不能用“大家好”开始提问吗?

大家好,

首次启动时会立即显示通知。以下是设置通知的代码。它应该每天上午9点到10点出现。

NotificationManager notificationManager = (NotificationManager)context.getSystemService(Context.NOTIFICATION_SERVICE);
Notification notification = intent.getParcelableExtra(NOTIFICATION);
int id = intent.getIntExtra(NOTIFICATION_ID, 0);
notificationManager.notify(id, notification);

另一方面是报警广播接收器

PHP Warning:  preg_match(): Unknown modifier '[' in /home/3ZZyLt/prog.php on line 4

死简单但不起作用。

1 个答案:

答案 0 :(得分:0)

我认为问题出在日历上。 你调用set方法而不需要移动一天,因此很可能是你试图为已经过去的时间设置警报。

相关问题