notify
notify copied to clipboard
How do i add sound and vibration
How do i add sound and vibration
Hey @lastpeony, please refer to #56 and let me know if you have any issues with that!
Karn.
var pattern:List<Long> = listOf(200,200)
var notificationSound = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION)
.alerting("someKey") {
vibrationPattern = pattern// Array defining the pattern
sound = notificationSound// Uri to sound
}
Doesnt work. i use version 1.1.0
@lastpeony Is there a particular error you're seeing or is it silently ignoring the config? Can you also share the android version and device you're testing on please?
this isn't working for me either. I tried to set the sound to an empty audio track but I can still hear the notification ringtone. I'm using Pixel emulator SDK 29 and this is my code,
sound = Uri.parse("${SCHEME_ANDROID_RESOURCE}://$packageName/raw/silence")
Is it correct or is there a different way to get the URI?