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

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

问题描述

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

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

喜欢此链接

链接

推荐答案

步骤1: 在您的应用程序包中包含所有可能的色调

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天全站免登陆