制作提醒应用有什么用?
我想写个提醒。我需要使用什么?制作服务应用程序或只是在后台运行的标准应用程序或其他方式?
感谢您的回复!
I want to write reminder. What i need to use? Make service app or just standart app runing in background or another way?
Thanks for replys!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我真正喜欢这个问题的是你询问了你想要实现的应用程序的想法。你没有要求代码。
我建议您应该制作一个应该有广播接收器的应用程序,但它仍然应该有在后台运行的服务。
该服务将检查当前时间与您的提醒时间。需要广播接收器来收听启动广播,因为您需要在手机启动后立即启动应用程序。
看看这个。
What I really liked about this question is you asked about the idea for the app that you want to implement. You didn't ask for code.
I would suggest that you should make an app which should have a broadcast receiver, but still it should have service that runs in background.
The service will check the current time with your reminder time. A broadcast receiver is required to listen to startup broadcast, because you need to start your app as soon as your handset starts.
Have a look at this.
查看
AlarmManager
。它允许您安排应用程序在将来的某个时间运行。Have a look at the
AlarmManager
. It allows you to schedule your application to be run at some point in the future.