@rdlabo/capacitor-screenshot-event
v6.0.0
Published
Notification that user shot screenshot
Downloads
2,999
Readme
@rdlabo/capacitor-screenshot-event
Notification that user shot screenshot
Install
npm install @rdlabo/capacitor-screenshot-event
npx cap sync
Usage
(() => {
ScreenshotEvent.addListener('userDidTakeScreenshot', () => {
// Notice take screenshot
});
// Start watch take event
ScreenshotEvent.startWatchEvent();
})();
API
startWatchEvent()
startWatchEvent() => Promise<void>
removeWatchEvent()
removeWatchEvent() => Promise<void>
addListener(...)
addListener(eventName: 'userDidTakeScreenshot', listenerFunc: () => void) => Promise<PluginListenerHandle>
| Param | Type |
| ------------------ | ------------------------------------ |
| eventName
| "userDidTakeScreenshot" |
| listenerFunc
| () => void |
Returns: Promise<PluginListenerHandle>
Interfaces
PluginListenerHandle
| Prop | Type |
| ------------ | ----------------------------------------- |
| remove
| () => Promise<void> |