Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
@capacitor-community/privacy-screen
Advanced tools
Capacitor plugin that protects your app from displaying a screenshot in Recents screen/App Switcher.
@capacitor-community/privacy-screen
Capacitor Privacy Screen Plugin
⚡️ Capacitor plugin that protects your app from displaying a screenshot in Recents screen/App Switcher.
On Android, this plugin sets the FLAG_SECURE flag to treat the content of the window as secure, preventing it from appearing in screenshots or from being viewed on non-secure displays.
On iOS, this plugin hides the webview window when the app is no longer active and loses focus (UIApplicationWillResignActiveNotification) so that a gray screen is shown instead.
Maintainer | GitHub | Social |
---|---|---|
Robin Genz | robingenz | @robin_genz |
npm install @capacitor-community/privacy-screen@next
npx cap sync
npm install @capacitor-community/privacy-screen
npx cap sync
On iOS, no further steps are needed.
On Android, register the plugin in your main activity:
import com.getcapacitor.plugin.privacyscreen.PrivacyScreen;
public class MainActivity extends BridgeActivity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// Initializes the Bridge
this.init(
savedInstanceState,
new ArrayList<Class<? extends Plugin>>() {
{
// Additional plugins you've installed go here
// Ex: add(TotallyAwesomePlugin.class);
add(PrivacyScreen.class);
}
}
);
}
}
No configuration required for this plugin.
The plugin only needs to be installed. The protection is enabled by default. However, you have the option to enable/disable the protection:
import { Plugins } from '@capacitor/core';
import '@capacitor-community/privacy-screen';
const enable = async () => {
await Plugins.PrivacyScreen.enable();
};
const disable = async () => {
await Plugins.PrivacyScreen.disable();
};
enable() => Promise<void>
Enables the privacy screen protection.
Only available for Android and iOS.
Since: 1.1.0
disable() => Promise<void>
Disables the privacy screen protection.
Only available for Android and iOS.
Since: 1.1.0
See CHANGELOG.md.
See LICENSE.
FAQs
Capacitor plugin that protects your app from displaying a screenshot in Recents screen/App Switcher.
The npm package @capacitor-community/privacy-screen receives a total of 6,272 weekly downloads. As such, @capacitor-community/privacy-screen popularity was classified as popular.
We found that @capacitor-community/privacy-screen demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.