cordova-plugin-vibration icon indicating copy to clipboard operation
cordova-plugin-vibration copied to clipboard

doesn't work

Open almaz1213 opened this issue 2 years ago • 2 comments

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

almaz1213 avatar Jul 24 '22 19:07 almaz1213

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).

breautek avatar Jul 27 '22 01:07 breautek

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).

van9petryk avatar Oct 16 '23 08:10 van9petryk