【问题标题】:Configuring the sound played when Push Notification is received配置收到推送通知时播放的声音
【发布时间】:2011-07-12 23:33:47
【问题描述】:

我们如何配置应用程序在后台并收到推送通知时播放的声音?

【问题讨论】:

    标签: iphone objective-c ios cocoa-touch push-notification


    【解决方案1】:

    查看"The Notification Payload" sectionthis document


    示例 JSON 有效负载(改编自上述文档):

    {
        "aps" : {
            "alert" : "You got your emails.",
            "badge" : 9,
            "sound" : "bingbong.aiff"
        }
    }
    

    您在此处查找的键是 sound,它是一个指向您的包中的 aiffcafwav 文件的字符串。

    【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2022-08-20
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多