iOS推送通知自定义声音重复? [英] iOS Push Notification custom sound repeat?

查看:35
本文介绍了iOS推送通知自定义声音重复?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在处理推送通知.我已经为推送通知实现了自定义声音.
如果推送通知自定义声音只有 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推送通知自定义声音重复?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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