cordova-plugin-vibration
cordova-plugin-vibration copied to clipboard
doesn't work
Bug Report
Problem
Android Studio Logcat: E/Capacitor/Console: File: http://localhost/main.26d719c053273456.js - Line 1 - Msg: Blocked call to navigator.vibrate because user hasn't tapped on the frame or any embedded frame yet: https://www.chromestatus.com/feature/5644273861001216
This plugin relies on the webview implementation for the android platform. Unfortunately, based on the chrome status link, as of webview 60, it requires a trusted user event to be triggered before it will allow the vibrate API to be invoked.
Possible workaround is to use v2.x of this plugin, which contains a native implementation, instead of relying on the browser implementation (however it may or may not work with modern tooling, I haven't tested it).
They should remove WebView implementation and restore native. Just tried v2 and works fine. With v3 I was unable to trigger vibration (POCO X3 NFC).