简体   繁体   中英

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

This seems to work

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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