定期发出嗡嗡声的苹果推送通知 [英] apple push notification with sound buzzing at regular interval

查看:22
本文介绍了定期发出嗡嗡声的苹果推送通知的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个关于 iOS 上的 Apple 推送通知有效负载的小而棘手的问题.

I have a small but tricky question over apple push notification payload on iOS.

据我所知,推送通知有效载荷可以有声音(长度 <= 30 秒)、文本和徽章.现在我想要我的 iphone 应用程序是我的提供商(服务器)发送到 iPhone 屏幕上的这个应用程序的推送通知以固定的时间间隔(比如每 1 分钟)不断地嗡嗡作响,直到用户点击屏幕上的通知(即检查信息).因此,当用户点击并启动应用程序时,通知会不断播放声音并停止播放.

From what I know the push notification payload can have sound (length <= 30 seconds), text and badge. Now what I want with my iphone app is that the push notification sent by my provider (server) to this app on iPhone screen to constantly buzz at regular interval (say every 1 min) until user taps on the notification on screen (i.e. checks the message). Hence, the notification would play the sound constantly and stops when user taps and launch the app.

可行吗?怎么样?

PS:它是一个企业应用程序,不会部署在 App Store 上.

PS: Its an enterprise application and would not be deployed on App Store.

提前致谢.

推荐答案

是的.这是您可以实现的方式:

Yes, it is. This is how you could implement that:

  1. 为推送通知注册设备
  2. 每 30-60 秒发送一条带有声音的推送消息
  3. 在 30-60 秒后使每条消息无效,为新消息腾出空间
  4. 当用户重新打开应用时,将应用注册为重新打开到服务器并停止发送推送通知

我不知道这在通知中心会是什么样子,但你可以测试看看:)

I do not know how this would look in the notification center, but you can test and have a look :)

这篇关于定期发出嗡嗡声的苹果推送通知的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆