Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pranavagiligar/cxm-plugin-screenprivacy
cordova/capacitor plugin for screen privacy on android/ios app
https://github.com/pranavagiligar/cxm-plugin-screenprivacy
capacitor capacitor-plugin cordova cordova-plugin
Last synced: about 2 months ago
JSON representation
cordova/capacitor plugin for screen privacy on android/ios app
- Host: GitHub
- URL: https://github.com/pranavagiligar/cxm-plugin-screenprivacy
- Owner: pranavagiligar
- License: mit
- Created: 2022-01-12T10:40:22.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2022-03-02T10:45:31.000Z (almost 3 years ago)
- Last Synced: 2024-08-09T07:09:46.867Z (5 months ago)
- Topics: capacitor, capacitor-plugin, cordova, cordova-plugin
- Language: Java
- Homepage:
- Size: 19.5 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# cxm-plugin-screenprivacy
Plugin can stop screenshot, screen capture and preview from app switcher on Android and can stops preview from app switcher on iOS## Installation [Stable]
`cordova plugin add [email protected]`
Also works as Capacitor plugin#### For local setup / plugin development and enhancement
1. clone the repository to cordova directory
2. cordova plugin add ./cxm-plugin-screenprivacy## Warning: Backwad version breaking!
Due to problems with iOS implementation, in his version iOS doesnt provide screen recording and sreenshot privacy and it is only avaiable for android. For iOS screen record prevention feature go back to version 1.1.0## Usage
```js
// {"message": "success or failure", "reason": "reason in case of error"}
function successCallback(result) {
console.log(result);
}// {"message": "success or failure", "reason": "reason in case of error"}
function errorCallback(error) {
console.log(error);
}// To block screen recording and screenshots in android
// Alternative: unblockAppScreen()
window.plugins.screenprivacy.blockAppScreen(
successCallback, errorCallback
);// Alternative: unblockAppSwitcher()
// To block only screens in app switcher on android and ios
window.plugins.screenprivacy.blockAppSwitcher({}, {});
```Can activate both feature at the same time to enable full screen privacy that possibly provided by the platform
Thanks to [flotrugliocoffice](https://github.com/flotrugliocoffice/cordova-plugin-prevent-screenshot-coffice)