Skip to content

Cordova / PhoneGap plugin that secures your app from displaying a screenshot in task switchers under Android and iOS. Keeps sensitive information private.

License

Notifications You must be signed in to change notification settings

firstbirdtech/PrivacyScreenPlugin

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

79 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PrivacyScreenPlugin

Both iOS (as of iOS 7) and Android have app switchers that display a screenshot of your app.

This is a lovely feature for most apps, but if your app displays sensitive information this is a possible privacy risk.

This plugin flags your app so that it doesn't show your users' sensitive data in the task switcher. It sets the FLAG_SECURE flag in Android (which also prevents manual screenshots from being taken) and hides the window in iOS.

On iOS this plugin will show a gradient color view on top of your window.

Installation

Add this line to config.xml:

<plugin name="cordova-plugin-fb-privacyscreen" spec="https://github.com/firstbirdtech/PrivacyScreenPlugin.git" />

Usage:

This plugin exposes no interface in JavaScript, it simply sets your app to be private. You don't need to do anything except install the plugin.

For iOS there are 3 preferences that can be set in config.xml:

  • "PrivacyOnBackground": If set to "true" allows privacy screen to be shown only when app enters background (i.e. switched to another app or pressed the home button)

When using splash storyboard add images to the config xml, i.e

<splash src="res/screen/ios/LaunchImage@2x~universal~anyany.png" />
<splash src="res/screen/ios/LaunchImage@3x~universal~anyany.png" />

Test this plugin on a real device because the iOS simulator (7.1 at least) does a poor job hiding your app.

About

Cordova / PhoneGap plugin that secures your app from displaying a screenshot in task switchers under Android and iOS. Keeps sensitive information private.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Objective-C 70.8%
  • Java 29.0%
  • JavaScript 0.2%