开发者

Configuring the sound played when Push Notification is received

H开发者_JAVA百科ow can we configure the sound which gets played when an application is in the background and a push notification is received?


Check out the "The Notification Payload" section of this document.


Example JSON Payload (adapted from above document):

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

The key you're looking for here is sound, it's a string that points to an aiff, caf, or wav file within your bundle.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜