@rdlabo/capacitor-screenshot-event
v8.0.0
Published
Notification that user shot screenshot
Readme
@rdlabo/capacitor-screenshot-event
Notification that user shot screenshot
💖 Support This Project
Enjoying this project? Your support helps keep it alive and growing!
Sponsoring means you directly contribute to new features, improvements, and maintenance.
Install
npm install @rdlabo/capacitor-screenshot-event
npx cap syncUsage
(() => {
ScreenshotEvent.addListener('userDidTakeScreenshot', () => {
// Notice take screenshot
});
// Start watch take event
ScreenshotEvent.startWatchEvent();
})();API
startWatchEvent()
startWatchEvent() => Promise<void>removeWatchEvent()
removeWatchEvent() => Promise<void>addListener('userDidTakeScreenshot', ...)
addListener(eventName: 'userDidTakeScreenshot', listenerFunc: () => void) => Promise<PluginListenerHandle>| Param | Type |
| ------------------ | ------------------------------------ |
| eventName | 'userDidTakeScreenshot' |
| listenerFunc | () => void |
Returns: Promise<PluginListenerHandle>
Interfaces
PluginListenerHandle
| Prop | Type |
| ------------ | ----------------------------------------- |
| remove | () => Promise<void> |
