开发者

Configuring the sound played when Push Notification is received

开发者 https://www.devze.com 2023-03-20 08:04 出处:网络
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

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

精彩评论

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