{"id":15294674,"url":"https://github.com/cesp99/screenshield","last_synced_at":"2026-02-03T23:32:37.628Z","repository":{"id":255921162,"uuid":"853892070","full_name":"cesp99/ScreenShield","owner":"cesp99","description":"An Open Source library to hide the screens during screenshots or recordings","archived":false,"fork":false,"pushed_at":"2024-10-23T12:01:14.000Z","size":8,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-24T17:52:58.676Z","etag":null,"topics":["android","jetpack-compose","kotlin","kotlin-android","open-source","privacy"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cesp99.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-09-07T20:30:23.000Z","updated_at":"2024-12-12T15:16:53.000Z","dependencies_parsed_at":"2024-09-07T21:38:36.885Z","dependency_job_id":"a0462051-af6b-4b72-a691-0ce824b84308","html_url":"https://github.com/cesp99/ScreenShield","commit_stats":null,"previous_names":["cesp99/screenshield"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cesp99%2FScreenShield","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cesp99%2FScreenShield/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cesp99%2FScreenShield/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cesp99%2FScreenShield/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cesp99","download_url":"https://codeload.github.com/cesp99/ScreenShield/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248288361,"owners_count":21078903,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","jetpack-compose","kotlin","kotlin-android","open-source","privacy"],"created_at":"2024-09-30T17:05:50.689Z","updated_at":"2026-02-03T23:32:37.603Z","avatar_url":"https://github.com/cesp99.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ScreenShield: Comprehensive Protection for Sensitive Content\r\n\r\nScreenShield is a robust Kotlin library designed to safeguard your Android app's sensitive content by preventing screenshots and screen recordings. Built with Jetpack Compose, this library leverages Android's `FLAG_SECURE` flag to automatically protect your app's screens while they are active, ensuring that confidential information remains secure.\r\n\r\nScreenShield offers a seamless solution for enhancing your app's privacy, and it's currently used in the [Eyed Auth](https://play.google.com/store/apps/details?id=de.aploi.eyedauth) app, showcasing its effectiveness in real-world applications. \r\n\r\nThe library's implementation draws inspiration from the work of [@ahmetfurkhans](https://github.com/ahmetfurkans/BlockScreenShotCompose).\r\n\r\n## Key Features\r\n\r\n- **Screenshot Protection**: Blocks users from taking screenshots of protected screens within your app.\r\n- **Screen Recording Prevention**: Disables screen recording while your app is in the foreground, ensuring sensitive information cannot be captured.\r\n- **Lifecycle Integration**: Automatically applies protection when your app is in use and removes it when the app goes into the background.\r\n\r\n## Installation\r\n\r\nTo integrate ScreenShield into your Jetpack Compose project, simply drag and drop `ScreenShield.kt` into your codebase, add `import ScreenShield` where you want to use it and wrap the content you wish to protect with it.\r\n\r\n## Usage\r\n\r\n```kotlin\r\nimport ScreenShield\r\n\r\n@Composable\r\nfun YourProtectedScreen() {\r\n    ScreenShield {\r\n        // Your protected UI content\r\n    }\r\n}\r\n```\r\n\u003e [!NOTE]  \r\n\u003e By wrapping your composables with `ScreenShield`, you ensure that screenshots and screen recordings are blocked whenever the screen is active.\r\n\r\n\r\n## How It Works\r\n\r\nScreenShield uses Android's `WindowManager.LayoutParams.FLAG_SECURE` flag to prevent screenshots and screen recordings. The library is lifecycle-aware, automatically managing protection based on the current state of the app. Whether your app is in the foreground or background, ScreenShield ensures that your content is secure.\r\n\r\n### Core Components:\r\n\r\n1. **ScreenShield Composable**: The central composable that blocks screenshots and recordings.\r\n2. **ComposableLifeCycle**: A lifecycle-aware composable that triggers protection based on the app's state.\r\n3. **findActivity()**: A helper function that retrieves the current activity, essential for applying window flags.\r\n\r\n\r\n\r\n## License\r\n\r\nThis project is distributed under the MIT License. For more details, refer to the [LICENSE](LICENSE) file.\r\n\r\n## Contact\r\n\r\nFor inquiries or support, feel free to reach out to Carlo at [carlo@aploi.de](mailto://carlo@aploi.de).\r\n\r\n## Authors\r\n\r\n- [Carlo Esposito](https://www.github.com/cesp99)\r\n- [Ahmet Furkan](https://github.com/ahmetfurkans) (Original implementation)\r\n\r\n## Used By\r\n\r\nThis library is proudly used in the [Eyed Auth](https://play.google.com/store/apps/details?id=de.aploi.eyedauth) app, demonstrating its reliability in protecting sensitive user information.\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcesp99%2Fscreenshield","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcesp99%2Fscreenshield","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcesp99%2Fscreenshield/lists"}