Android每日通知

ore*_*ion 3 service notifications android

如何让Android系统每天在我的应用中显示通知?我是否需要服务,如果需要,我该如何处理呢谢谢

Raf*_*l T 6

你不需要服务.您可以使用AlarmManager在所需时间进行广播.在您的BroadcastReciever中收听并在那里发送您的通知.发送通知后,在其中注册另一个警报.

  • 为此,您必须注册另一个BroadcastReciever并接收"BootCompleted"广播以注册新的警报.看看这是怎么做的http://stackoverflow.com/questions/2784441/trying-to-start-a-service-on-boot-on-android (2认同)