@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 sync
Usage
import { ScreenshotEvent } from '@rdlabo/capacitor-screenshot-event';
(() => {
ScreenshotEvent.addListener('userDidTakeScreenshot', () => {
// Notice take screenshot
});
// Start watch take event
ScreenshotEvent.startWatchEvent();
})();
API
<docgen-index>
</docgen-index>
<docgen-api>
startWatchEvent()
startWatchEvent() => Promise<void>
removeWatchEvent()
removeWatchEvent() => Promise<void>
addListener('userDidTakeScreenshot', ...)
addListener(eventName: 'userDidTakeScreenshot', listenerFunc: () => void) => Promise<PluginListenerHandle>
| Param | Type |
|---|---|
eventName |
<code>'userDidTakeScreenshot'</code> |
listenerFunc |
<code>() => void</code> |
Returns: <code>Promise<<a href="#pluginlistenerhandle">PluginListenerHandle</a>></code>
Interfaces
PluginListenerHandle
| Prop | Type |
|---|---|
remove |
<code>() => Promise<void></code> |
</docgen-api>