You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, the @capacitor-community/privacy-screen plugin handles both privacy screen protection and screenshot prevention as a single feature set. While useful, this coupling can limit flexibility for applications that need discrete control over these two functionalities. This feature request aims to propose the separation of privacy screen and screenshot protection into two independently controllable features.
Current Behavior
The plugin activates both privacy screen protection and screenshot blocking simultaneously, without allowing separate control over these features.
Desired Behavior
Introduce separate methods for enabling/disabling the privacy screen and for enabling/disabling screenshot protection. This would allow developers to tailor the behavior of their applications more precisely, depending on the context and user settings.
Proposed Changes
Separate API Methods:
enablePrivacyScreen(): Enables the privacy screen without affecting screenshot capabilities. disablePrivacyScreen(): Disables the privacy screen independently. enableScreenshotProtection(): Enables screenshot protection without activating the privacy screen. disableScreenshotProtection(): Disables screenshot protection independently.
The text was updated successfully, but these errors were encountered:
I have created a PR-113 to add support in Android for separate privacy screen and screenshot functionality.
The main idea is to add an extra View for the privacy screen, to detect when the View loses focus or the app stops.
And use WindowManager.LayoutParams.FLAG_SECURE only to manage screenshots dynamically.
Summary
Currently, the @capacitor-community/privacy-screen plugin handles both privacy screen protection and screenshot prevention as a single feature set. While useful, this coupling can limit flexibility for applications that need discrete control over these two functionalities. This feature request aims to propose the separation of privacy screen and screenshot protection into two independently controllable features.
Current Behavior
The plugin activates both privacy screen protection and screenshot blocking simultaneously, without allowing separate control over these features.
Desired Behavior
Introduce separate methods for enabling/disabling the privacy screen and for enabling/disabling screenshot protection. This would allow developers to tailor the behavior of their applications more precisely, depending on the context and user settings.
Proposed Changes
Separate API Methods:
enablePrivacyScreen()
: Enables the privacy screen without affecting screenshot capabilities.disablePrivacyScreen()
: Disables the privacy screen independently.enableScreenshotProtection()
: Enables screenshot protection without activating the privacy screen.disableScreenshotProtection()
: Disables screenshot protection independently.The text was updated successfully, but these errors were encountered: