如何安排重复的苹果推送通知?

发布于 2024-08-22 13:28:26 字数 261 浏览 4 评论 0原文

我想知道是否可以设置重复推送通知。我想这样做的原因是允许我的用户在特定时间安排每日提醒。这可能吗?目前我能想到的唯一选择是:

  • 安排大量通知,比如在接下来的 30 天内每个通知一个。然后,每次启动应用程序时“充值”通知,
  • 允许用户仅选择特定时间(例如凌晨 1 点、凌晨 2 点、凌晨 3 点),然后让服务每小时运行一次,并向已注册的设备发送批量通知对于那个时间段。

我计划使用 Urban Airship 平台,但我愿意接受其他建议。

I am wondering if it is possible to setup repeating push notifications. The reason I want to do this is to allow my users to schedule a daily reminder at a particular time. Is this possible? Currently the only options I can think of are:

  • schedule a lot of notifications, say one each for the next 30 days. Then "top up" the notifications every time the app is launched
  • allow the user's to only pick specific times (eg. 1am, 2am, 3am), and then have a service runs once per hour and sends out batch notifications to devices that have registered for that timeslot.

I am planning to use the Urban Airship platform, but am open to other suggestions.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

风吹雪碎 2024-08-29 13:28:26

目前,任何主要服务提供商(Airship、iLime、App Notify)均不支持定期通知。 iLime 和 App Notify 很快就会以某种形式推出此功能,而 Airship 则不会(至少在不久的将来)。所有这些都是基于与这些公司的直接通信。我建议使用 cron 作业在您自己的服务器上实现调度部分,然后使用如下代码将推送请求发送到 Urban Airship(或您选择的任何人): http://bitbucket.org/urbanairship/push_sample/

Recurring notifications are not currently supported by any of the major service providers (Airship, iLime, App Notify). iLime and App Notify are rolling out this feature in some form soon, Airship is not (at least in the near future). All of this is based on direct correspondence with these companies. I suggest either implementing the scheduling part on your own server using cron jobs and then sending the push request to Urban Airship (or whomever you choose) using code like this: http://bitbucket.org/urbanairship/push_sample/

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文