简体   繁体   English

Localytics android推送消息通知声音

[英]Localytics android push message notification sound

I have integrated localytics and localytics push notifications in my app. 我在我的应用程序中集成了本地语言和本地语言推送通知。 However when the push message arrives, the notification is shown with the system default sound. 但是,当推送消息到达时,将以系统默认声音显示通知。 How do I change that to a custom sound? 如何将其更改为自定义声音? Sound is a bit essential to the branding of my app so I'd really like to do this. 声音对于我的应用品牌来说必不可少,所以我真的很想这样做。

I searched the localytics docs and there's sound config for iOS but I couldn't find it for Android 我搜索了localytics文档,并找到了iOS的声音配置,但找不到Android的配置

This seems to work 这似乎有效

Localytics.setPushNotificationOptions(new PushNotificationOptions.Builder()
                .setSound(Uri.parse("YOUR_MP3FILE"))
                .build());

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM