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

Fix vibration issues by using VibratorManager #192

Open
wants to merge 1 commit into
base: 1.3
Choose a base branch
from

Conversation

lolokraus
Copy link
Collaborator

fixes #191

This may need a bit more testing, but on my device Pixel 8, Android 15 I could solve the issue by using the VibratorManager instead of Vibrator.

@lolokraus lolokraus changed the base branch from master to 1.3 December 20, 2024 14:13
try {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
// Use new API for Android 12+
val vibratorManager = GlucoDataService.context!!.getSystemService(Context.VIBRATOR_MANAGER_SERVICE) as VibratorManager
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

vibrator instance is already the default vibrator of VibratorManager!? Also cancel will not work!?
So I think, we will need something more....
I will test.

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.

Vibration not working correclty on newer devices
2 participants