Open VaultDeveloper opened 3 years ago
My Nokia 7.1 with Android 10 vibrates using this plugin. One thing to note is that 200ms is a really low value, it is the lowest value my phone vibrates at (100ms would not vibrate at all). You should try with longer vibration time (500ms-1000ms) to rule out the length of vibration being an issue, and then also you should try to call the Cordova plugin directly, like navigator.vibrate(500)
.
Thank you for your feedback. I performed additional tests based on the points you mentioned.
Howewer, I try to do vibrations in another screens of my application and everything works fine (even 100 ms vibrations). The only screen where it doesn't works is in the modal I need it. It works in another modal. In this modal I use another plugin, which can also emit vibrations Scandit for Cordova. I wonder if there can't be conflicts between the two plugins.
Also, both Android 10 devices I've tested with are Honor. It is possible that the problem might occur only with the manufacturer.
Hi, I can confirm this issue, but I have another two cents. Vibration does not work on Android 10/11, tried 500ms too. On Android 7 vibration works.
v3 relies on the browser implementation for implementations. This plugin does not implement vibrations for the android platform itself.
I'd advise checking the JS console by using chrome's remote webview inspector, to see if there are any related error messages such as: Blocked call to navigator.vibrate because user hasn't tapped on the frame or any embedded frame yet
.
Potentially related to: https://github.com/apache/cordova-plugin-vibration/issues/110
Just use v2
ionic cordova add cordova-plugin-vibration@2.1.6
Bug Report
Problem
What is expected to happen?
Vibrations.
What does actually happen?
No vibrations.
Command or Code
Environment, Platform, Device
Only tested on Android devices. Everything is working fine until I use a Android 10 device. I have tested only on 2 Android 10 devices and both doesn't vibrate. Little detail: If I click on the overwiew button (the right physic button on the bottom of the screen), the device vibrates when the app goes in background.
Version information
cordova-plugin-vibration: 3.1.1. cordova-android: 9.0.0 cordova-plugin-androidx: 3.0.0 cordova-plugin-androidx-adapter: 1.1.1 I use the Ionic framework
Checklist