在我的应用中选择推送通知的声音 [英] Choose sounds for push notification in my app

查看:28
本文介绍了在我的应用中选择推送通知的声音的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发应用程序,需要让用户从我的应用程序设置中选择系统声音推送通知的音调.如何让用户打开系统提示音并选择推送通知?

I am working on app and need to let the user from my settings on app to choose the tone for push notification from system sounds. How to let user open system sounds and choose one for push notification?

喜欢whatsapp通知设置

Like whatsapp notification settings

喜欢这个链接

链接

推荐答案

第一步:在您的应用程序包中包含所有可能的音调

Step 1: Include all possible tones in your app's bundle

第 2 步:允许用户选择他们想要的音色

Step 2: Allow user to select which tone they want

第 3 步:将其存储在服务器上的某处

Step 3: Store that on server somewhere

第 4 步:推送该用户时,将他们想要的声音包含在包中

Step 4: When pushing that user, include their desired sound in the package

aps : {
    alert : "Some Message",
    sound : <#userPreferredSound#>
}

这篇关于在我的应用中选择推送通知的声音的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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