android - 设置状态栏通知的具体日期

标签 android date notifications statusbar

我只是希望用户使用 EditText 字段(或者可能是日期选择器)选择日期,然后应用程序将其存储在 SQLite 数据库中。 (我只存储该月的日期,因此每个月的特定日期(1 日、10 日、22 日等)都会弹出。)通知系统会检查该日期并显示“提醒”状态栏中的通知会在按下时将他们直接带到应用程序以更新某些信息。

基于简单教程here (在“基础知识”部分),“何时”变量决定“何时”弹出通知?如果是这样,我可以用从数据库动态生成的日期变量填充它吗?

最佳答案

The notification system comes around and checks for that date and displays a "reminder" notification in the status bar that takes them directly to the app to update certain information when pressed.

如果“通知系统”是指“我编写的应用程序”,那么这是可能的。使用AlarmManager要在指定时间安排闹钟,请将控制路由到 BroadcastReceiver可以创建并显示您的 Notification .

Based on the simple tutorial here (tin "The Basics" section), is the "when" variable what decides "when" the notification pops up?

没有。它是与 Notification 关联的时间戳。用于显示目的(例如,可能出现在通知抽屉中)。

关于android - 设置状态栏通知的具体日期,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10903291/

相关文章:

javascript - 以秒为单位获取两个日期之间的时差

json - 请求正文日期解析问题

php - 当类型为时间戳时,查找两个日期之间的记录不起作用

javascript - 使用 JS/Ajax API 将通知标记为已读

android - 所有图表值都不显示在图表引擎的折线图中

android - 如何将字符串和整数连接成一个变量

java - 当我使用这个线程代码时,我的应用程序崩溃了

java - 找不到uninstall.exe android studio

android - Android BigPictureStyle 推送通知中的图像/位图大小应该是多少?

cocoa - 当鼠标悬停在特定 NSMenuItem 上时收到通知