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

doesn't work #110

Open
almaz1213 opened this issue Jul 24, 2022 · 2 comments
Open

doesn't work #110

almaz1213 opened this issue Jul 24, 2022 · 2 comments

Comments

@almaz1213
Copy link

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

@breautek
Copy link

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

@van9petryk
Copy link

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

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

3 participants