在应用程序关闭时根据数据库中的数据安排通知
我需要在确切的时间安排通知,但不要显示它,除非SQLITE数据库中存在某个值。
这可以通过另一种方式完成,通过每天00:00检查数据库,并根据数据安排通知。
因此,我需要控制OS是否应根据数据库显示通知还是不显示通知,或者我需要使用数据库并在关闭应用程序时安排通知。
有办法做到吗?
I need to schedule a notification at an exact time, but not to show it except if a certain value exists in the SQLite database.
This can be done in another way, by checking the database daily at 00:00, and scheduling the notification depending on the data.
So, I need to control if the OS should show a notification or not depending on the database, or I need to use the database and schedule the notification when the app is closed.
Is there a way to do that?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以通过检查数据库中的标志来设置通知。例如:如果
数据库架构:
将数据库映射到模型:
如果显示示例化标志为真,请设置通知或不设置通知
You can set the notification by checking the flag in the database. For example: if the
Database schema:
Map database to a model:
If showNotification flag is true, set the notification or else, do not set notification