Mobile Screenshots
Eser Deniz
NativePHP^3.0iOS17.0+Android26+
A NativePHP plugin for capturing and controlling screenshots on mobile devices.
Features
- Block screenshots and screen recordings (
FLAG_SECUREon Android; privacy overlay on iOS) - Real-time detection of capture attempts via Laravel events
- Programmatic screenshot capture for bug reports and audit trails
- Platform-native implementations for iOS 17+ and Android 8+
Installation
composer require srwiez/nativephp-mobile-screenshots
php artisan vendor:publish --tag=nativephp-plugins-provider
php artisan native:plugin:register srwiez/nativephp-mobile-screenshots
Compatibility
| Platform | Minimum Version |
|---|---|
| NativePHP | ^3.0 |
| iOS | 17.0+ |
| Android | API 26+ |
Events
ScreenshotDetected— fires when user captures the screenScreenshotCaptured— fires on successful programmatic captureScreenshotCaptureFailed— fires when programmatic capture failsScreenRecordingStarted(iOS only) — fires when screen recording beginsScreenRecordingStopped(iOS only) — fires when screen recording ends