notify icon indicating copy to clipboard operation
notify copied to clipboard

How do i add sound and vibration

Open lastpeony opened this issue 5 years ago • 4 comments

How do i add sound and vibration

lastpeony avatar Feb 04 '20 15:02 lastpeony

Hey @lastpeony, please refer to #56 and let me know if you have any issues with that!

Karn.

Karn avatar Feb 05 '20 05:02 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 avatar Feb 06 '20 19:02 lastpeony

@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?

Karn avatar Feb 10 '20 05:02 Karn

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?

irfnyas avatar Jun 12 '21 21:06 irfnyas