iOS Push Notification自定义声音重复吗? [英] iOS Push Notification custom sound repeat?
问题描述
我正在处理推送通知.我已经为推送通知实现了自定义声音.
如果推送通知自定义声音只有5秒长,是否可以重复播放直到达到最大声音限制(30秒)?
I am working with push notifications. I have implemented custom sound for push notifications.
Is it possible if push notification custom sound is only 5 sec long then can I repeat it till the max sound limit(30 sec) reach ?
例如:
我可以重复播放一次6次通知的声音吗?
For Example:
Can I play the sound for one notification 6 times repeatedly ?
JSON有效负载为:
JSON payload is :
array(
'alert' => $message,
'sound' => 'blackberry_3.mp3'
);
推荐答案
您不能直接使声音重复.
您必须发送另一个通知才能再次触发声音.
You can't directly make the sound repeating.
You have to send another notification to trigger sound another time.
看看这个问题,这个问题与您的问题非常相似:
定期以声音嗡嗡声发出的苹果推送通知
Take a look at this question, that is very similar to yours :
apple push notification with sound buzzing at regular interval
这篇关于iOS Push Notification自定义声音重复吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!