LogoLogo
HomeArticlesCommunity ProductsPremium ProductsGitHubTalsec Website
  • 👋Introduction
  • 🛠️Integration
    • 🤖Android
      • API
      • Troubleshooting
    • 🍎iOS
      • API
      • Troubleshooting
    • 🐦Flutter
      • FlutterFlow
      • API
      • Troubleshooting
    • ⚛️React Native
      • Expo
      • API
      • Troubleshooting
    • 👾Cordova
      • API
      • Troubleshooting
    • 🪽Capacitor
      • API
      • Troubleshooting
  • 🚀Features and Pricing plans
    • The Key Differences: freeRASP vs. RASP+
  • 🎤What's New and Changelog
  • 📊Security Report
  • ⚖️User Data Policies
  • 📄License
  • 🤝Fair Usage Policy (FUP)
  • ℹ️Wiki
    • Getting Signing Certificate Hash
    • Callback Delay, Telemetry Impact, and Threat Scanning Completion Status
    • Threat detection
      • Detecting rooted or jailbroken devices
      • Emulator detection
      • Hook detection
      • App tampering detection
      • Debugger detection
      • Detecting unofficial installation
      • Device binding detection
      • Missing obfuscation detection [Android devices only]
      • Secure Hardware detection (Keystore/Keychain secure storage check)
      • Passcode
      • System VPN detection
      • Developer Mode detection [Android devices only]
      • ADB enabled detection [Android devices only]
      • Screen Capture
    • Source code obfuscation
    • isProd flag
  • 🦉FAQ
  • 🧑‍💻About Us
  • 🤝Contribution
Powered by GitBook
On this page
  • Screenshot Detection
  • Screen Recording Detection
  • Screen Capture Protection
  • Check Screen Capture State
  • Read More
  • Watch on YouTube

Was this helpful?

Export as PDF
  1. Wiki
  2. Threat detection

Screen Capture

PreviousADB enabled detection [Android devices only]NextSource code obfuscation

Last updated 17 days ago

Was this helpful?

Screenshot Detection

Screenshot detection identifies when a screenshot is taken on a device. Screenshots can expose sensitive app data, such as user credentials, personal content, or confidential information, leading to privacy and security risks. By detecting screenshots, apps can take preventive measures, such as:

  • Obscuring sensitive content before the screenshot is captured.

  • Notifying users that a screenshot has been taken.

  • Logging events for security monitoring and analysis.

Platform-Specific Implementations

// Android screenshot detection
override fun onScreenshotDetected() {
    TODO("Not yet implemented")
}

// iOS screenshot detection
case screenshot

// Flutter screenshot detection
onScreenshot: () => print("Screenshot capture detected")

// React Native, Capacitor and Cordova
screenshot: () => {
  console.log('screenshot');
},

Screen Recording Detection

Screen recording detection helps identify when a device's screen is being recorded. Screen recordings can capture sensitive data, such as user interactions and proprietary app content. By detecting screen recordings, apps can:

  • Mask sensitive information during recording.

  • Alert users that their screen is being recorded.

  • Log events for further security analysis.

Platform-Specific Implementations

// Android screen recording detection
override fun onScreenRecordingDetected() {
    TODO("Not yet implemented")
}

// iOS screen recording and screen mirrorring detection
case screenRecording

// Flutter screen recording detection and screen mirrorring detection
onScreenRecording: () => print("Screen recording detected")

// React Native, Capacitor and Cordova
screenRecording: () => {
  console.log('screenRecording');
},

Recommended action: Log the event on your BE or hide the sensitive content.

Screen Capture Protection

Screen capture protection prevents your app’s content from appearing in screenshots and screen recordings. When enabled, captured images and recordings display a black screen, protecting sensitive information.

To enable or disable protection dynamically, pass true or false.

// Android screen capture protection
Talsec.blockScreenCapture(activity, true)

// iOS screen capture protection
Talsec.blockScreenCapture(enable: true, window: UIWindow)

// Flutter screen capture protection
await Talsec.instance.blockScreenCapture(enabled: true)

// React Native
import { blockScreenCapture } from 'freerasp-react-native';
await blockScreenCapture(true);
// response: Screen capture is now Blocked

// Capacitor
import { blockScreenCapture } from 'capacitor-freerasp';
await blockScreenCapture(true);
// response: true

// Cordova
await talsec.blockScreenCapture(true);
// response: Screen capture is now Blocked

Check Screen Capture State

To check whether screen capture is currently blocked in the application, use the following method:

// Android screen capture state
Talsec.isScreenCaptureBlocked()

// iOS screen capture state
Talsec.isScreenCaptureBlocked(in window: UIWindow)

// Flutter screen capture state
await Talsec.instance.isScreenCaptureBlocked()

// React Native
import { isScreenCaptureBlocked } from 'freerasp-react-native';
const response = await isScreenCaptureBlocked();
// response: true

// Capacitor
import { isScreenCaptureBlocked } from 'capacitor-freerasp';
const response = await isScreenCaptureBlocked();
//response: true

// Cordova
const response = await talsec.isScreenCaptureBlocked();
//response: true

For Android 11 (API 30) and lower, Screen Capture is able to help around 70% of the devices reliably. This is because on certain devices, keyboard taps can be recorded.

Read More

In our article we explain how to block screenshots, screen recording, and remote access tools in mobile apps to protect user data. It discusses security threats such as built-in screenshot tools, remote desktop apps like TeamViewer, screen mirroring software, third-party recording apps, and ADB-based access.

Watch on YouTube

ℹ️
Screenshot & Screen Recording Protection Demo | Talsec RASP+ & freeRASP
How to Block Screenshots, Screen Recording, and Remote Access Tools in Android and iOS Apps | AppSec Articles
Logo