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

Add vibrate setting on start stop recording #167

Closed

Conversation

quyenvsp
Copy link
Contributor

No description provided.

@chenxiaolong chenxiaolong self-assigned this Nov 23, 2022
@chenxiaolong
Copy link
Owner

Thanks for the PR!

I like the idea, but would prefer to take a different approach that doesn't require new permissions. With PR #169, BCR now shows a notification when recording completes. It should be possible to have similar behavior by turning on the vibration option in Android's settings for BCR's Background services and Success alerts notifications. Is that a good enough solution for what you want to do?

@quyenvsp
Copy link
Contributor Author

Yeah I know it and is first thing tried, but no idea why that way not working on my Px5a.

add NotificationChannel vibrateEnable vibratePattern, set IMPORTANCE_HIGH, uninstall module then re-install, allow notification bypass do not disturb....nothing can make notification vibrate work.
Even call notificationManager.notify in SettingsActivity worked, but not when calling.

About "doesn't require new permissions", android.permission.VIBRATE need on all ways, this permission dont need ask users, so I think it is ok.

chenxiaolong added a commit that referenced this pull request Nov 24, 2022
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]>
chenxiaolong added a commit that referenced this pull request Nov 24, 2022
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]>
@chenxiaolong
Copy link
Owner

Interesting. I thought it was working properly because my smartwatch vibrated, but after disconnecting my watch, I can reproduce the problem on my Pixel 7 Pro.

Can you give #171 a try? It uses the vibrator service, similar to this PR, except instead of adding a new setting, it just uses the notification channel's vibration setting.

@quyenvsp
Copy link
Contributor Author

Nice, it surely better if use notification setting, will test it on my device soon 👍

chenxiaolong added a commit that referenced this pull request Nov 24, 2022
@quyenvsp quyenvsp deleted the feature/notification-vibrate branch January 4, 2023 13:05
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