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

Vibration not working in first few calls #68

Closed
dovahkiin98 opened this issue Jun 24, 2022 · 3 comments
Closed

Vibration not working in first few calls #68

dovahkiin98 opened this issue Jun 24, 2022 · 3 comments

Comments

@dovahkiin98
Copy link

I tried to add this plugin to my app, and tested another one. Both had the same issue on iOS and web.

I basically made it vibrate when clicking a button. On few first clicks, nothing happens, but then suddenly the vibration works.

What could be the issue? I'm just calling Vibration.vibrate(), not even bothering with the custom duration overload, and not waiting for anything, it's just that function

@benjamindean
Copy link
Owner

If it's not isolated to one package, I would recommend using it inside the async loop. So, you'll have to await for the vibrate call. I'm not sure, but I think that's how Flutter handles its async calls.

@dovahkiin98
Copy link
Author

@benjamindean Not sure how awaiting the call helps? I'm not waiting for the response. Also, it works fine on Android, so it's not the code, it's the platform

@benjamindean
Copy link
Owner

Yeah, iOS is behaving quite weirdly, even according to the reported issues here. I'm unable to test it on a real iOS device, so I'll take a look at the code I've more, but not promising that it can be fixed. Meanwhile, try to awaiting for the call.

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

No branches or pull requests

2 participants