capacitor-screenshot-manager
v1.0.8
Published
Plugin to manage screenshot on Ios and Android
Downloads
29
Maintainers
Readme
capacitor-screenshot-manager
Plugin to manage screenshot on Ios and Android
Install
npm install capacitor-screenshot-manager
npx cap sync
Usage Android
import { Plugins } from '@capacitor/core';
const { ScreenshotManager } = Plugins;
async function disableScreenshots() {
await ScreenshotManager.blockScreenshots();
}
async function enableScreenshots() {
await ScreenshotManager.allowScreenshots();
}
API
echo(...)
echo(options: { value: string; }) => Promise<{ value: string; }>
| Param | Type |
| ------------- | ------------------------------- |
| options
| { value: string; } |
Returns: Promise<{ value: string; }>
ping(...)
ping(options: { message: string; }) => Promise<{ response: string; }>
| Param | Type |
| ------------- | --------------------------------- |
| options
| { message: string; } |
Returns: Promise<{ response: string; }>
addScreenshotListener(...)
addScreenshotListener(callback: (info: any) => void) => Promise<void>
| Param | Type |
| -------------- | ----------------------------------- |
| callback
| (info: any) => void |
addListener('screenshotEvent', ...)
addListener(eventName: 'screenshotEvent', listenerFunc: (info: any) => void) => Promise<PluginListenerHandle>
| Param | Type |
| ------------------ | ----------------------------------- |
| eventName
| 'screenshotEvent' |
| listenerFunc
| (info: any) => void |
Returns: Promise<PluginListenerHandle>
Interfaces
PluginListenerHandle
| Prop | Type |
| ------------ | ----------------------------------------- |
| remove
| () => Promise<void> |