Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Explicitly vibrate when vibration is enabled for a notification channel #171

Merged
merged 1 commit into from
Nov 24, 2022

Conversation

chenxiaolong
Copy link
Owner

Android's vibration setting seemingly has no effect when the user is in a phone call, which is always the case when a BCR notification is shown. With this commit, BCR will explicitly vibrate the device using a pattern that mimics what Android does by default for notifications.

This commit is inspired by @quyenvsp's PR #167, except it relies on Android notification channels' builtin vibration setting instead of adding a new setting to BCR.

Related PR: #167

Android's vibration setting seemingly has no effect when the user is in
a phone call, which is always the case when a BCR notification is shown.
With this commit, BCR will explicitly vibrate the device using a pattern
that mimics what Android does by default for notifications.

This commit is inspired by @quyenvsp's PR #167, except it relies on
Android notification channels' builtin vibration setting instead of
adding a new setting to BCR.

Related PR: #167

Signed-off-by: Andrew Gunnerson <[email protected]>
@quyenvsp
Copy link
Contributor

@chenxiaolong I tested and it work perfect, but for me vibrate one time better (like function vibrate haptic when answer/end call on Samsung), so I use pattern longArrayOf(0, 250, 250, 0). Anyway it perfect and can customize pattern 👍

@chenxiaolong chenxiaolong merged commit d237962 into master Nov 24, 2022
@chenxiaolong chenxiaolong deleted the vibration branch November 24, 2022 21:49
chenxiaolong added a commit that referenced this pull request Nov 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants