-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Fix for vibration on notifs for Android API >= 26 #1686
Conversation
…ations for API >= 26. This pattern is used for the Notif Builder for API < 26 and it appears to work there as well. Before: ``` <Sending Notif> 2020-10-04 12:37:03.630 1936-29464/? E/VibratorService: vibratorOff command failed (1). 2020-10-04 12:37:03.935 1936-29476/? E/VibratorService: vibratorOff command failed (1). ``` After: ``` <Sending Notif> 2020-10-04 12:07:16.037 1936-4760/? E/VibratorService: vibratorOff command failed (1). 2020-10-04 12:07:16.037 1936-4760/? E/VibratorService: vibratorOn command failed (1). 2020-10-04 12:07:16.438 1936-1936/? E/VibratorService: vibratorOff command failed (1). ``` Have tested this on a physical device as well and it works. This could lead to an obvious extension which is for users to specify a vibration pattern array when creating a channel.
Thanks for the PR! |
@Dallas62 - Bump, I think there's still value in landing this one. |
@Dallas62 - Hi, would you be able to review this pull request please? Just making sure it's not been forgotten about, it's just a little one (but an important fix for newer versions of Android). |
Hi, |
@mineshpatel1 thanks for the fix, made the change manually on my local and works as expected! |
Hi, Line 449 in b89eb22
|
Forget my last comment/commit, reverted, was tired 😄 You may encounter this bug in old version if the channel is already created. Two options:
|
Heads up, this only seems to work if the channel is re-created / full app re-install. |
This fixes the vibration feature for notification for Android notifications for API >= 26. This pattern is used for the Notif Builder for API < 26 and it appears to work there as well.
Before:
After:
Have tested this on a physical device as well and it works. This could lead to an obvious extension which is for users to specify a vibration pattern array when creating a channel.