apple push notification with sound buzzing at regular interval

ぐ巨炮叔叔 提交于 2019-12-02 17:07:02

问题


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

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.

Is it feasible? How?

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

Thanks in advance.


回答1:


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

  1. Register device for push notification
  2. Send out a push message with ref to a sound every 30-60 seconds
  3. Invalidate each message after 30-60 seconds, making room for the new one
  4. When user re-opens the app, register the app as re-opened to the server and stop sending out push notifications

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



来源:https://stackoverflow.com/questions/10532684/apple-push-notification-with-sound-buzzing-at-regular-interval

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!