@capacitor-community/tap-jacking
Tap Jacking is a technique where a malicious app tricks the user into clicking a security-relevant control (confirmation button etc.) by obscuring the UI with an overlay or by other means.
This plugin prevents tap jacking by calling setFilterTouchesWhenObscured(true)
(Android 11 and below) or setHideOverlayWindows
(Android 12+) as described in the Android Developer Documentation.
On iOS and web this call does nothing.
npm install @capacitor-community/tap-jacking
npx cap sync
import { TapJacking } from '@capacitor-community/tap-jacking';
...
await TapJacking.preventOverlays();
preventOverlays() => Promise<void>
enableOverlays() => Promise<void>