Skip to content

cordova/capacitor plugin for screen privacy on android/ios app

License

Notifications You must be signed in to change notification settings

pranavagiligar/cxm-plugin-screenprivacy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

// {"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

About

cordova/capacitor plugin for screen privacy on android/ios app

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published