Mobile Screenshots

Eser Deniz

AuthorEser DenizPlugin TypeCommunity PluginPrice$29Versionv1.2.0LicenseProprietary
NativePHP^3.0iOS17.0+Android26+

Screenshot and screen recording control for NativePHP Mobile — block captures, detect attempts in real-time, and take programmatic screenshots.

Features

  • Block screenshots and screen recordings (FLAG_SECURE on Android; privacy overlay on iOS)
  • Real-time detection of screenshot/recording attempts via Laravel events
  • Programmatic screenshot capture (for bug reports, audit trails)
  • Screen recording start/stop detection (iOS)

Installation

Requires a license from nativephp.com/plugins.

composer config repositories.nativephp-plugins composer https://plugins.nativephp.com
composer config http-basic.plugins.nativephp.com your@email.com your-license-key
composer require srwiez/nativephp-mobile-screenshots
php artisan vendor:publish --tag=nativephp-plugins-provider
php artisan native:plugin:register srwiez/nativephp-mobile-screenshots

PHP Usage

use Srwiez\NativephpMobileScreenshots\Facades\Screenshots;

// Block all screenshot/recording attempts
Screenshots::prevent();

// Allow screenshots again
Screenshots::allow();

// Programmatically capture the screen
Screenshots::capture();

// Check current prevention state
$isBlocked = Screenshots::isPreventing();

Livewire Usage

use Native\Mobile\Attributes\OnNative;
use Srwiez\NativephpMobileScreenshots\Events\ScreenshotDetected;

#[OnNative(ScreenshotDetected::class)]
public function onScreenshotDetected(): void
{
    // Log the attempt, warn the user, etc.
    $this->dispatch('screenshot-detected');
}

Compatibility

Platform Minimum Version
NativePHP ^3.0
iOS 17.0+
Android API 26+

Events

  • ScreenshotDetected — user captured the screen
  • ScreenshotCaptured — programmatic capture succeeded
  • ScreenshotCaptureFailed — programmatic capture failed
  • ScreenRecordingStarted (iOS only) — screen recording began
  • ScreenRecordingStopped (iOS only) — screen recording ended