The Inkrypt SDK includes built-in protections against unauthorized capture and debugging of protected video content. This guide explains what those protections do and what you need to know as an integrator.
Screen Capture Prevention
The SDK prevents users from taking screenshots or recording the player screen by applying the Android FLAG_SECURE window flag.
What it does
When the SDK's release build is active, the OS marks the player window as secure. Screenshots taken via the system share sheet, screen recorders, MediaProjection APIs, and assistant content captures will all be blocked, the player area appears black or is omitted entirely.
Requirements
FLAG_SECURE is applied automatically by the SDK in release builds. Debug builds do not apply it, so you can freely screenshot the player during development and testing.
No action is needed in your code. The protection is enabled automatically when you publish a release build of your app.
Scope
The flag is applied to your activity's window while the player fragment is attached. Any other content rendered in the same window will also be protected while the player is visible. If your app re-uses the activity for non-player screens after the player fragment is detached, test whether you need to explicitly clear FLAG_SECURE on those screens.
Screen Capture Detection (Android 14+)
On Android 14 and above, the SDK can detect when a screen capture attempt is made and report it to the Inkrypt backend.
What it does
If you use InkPlayerFragmentV34 (available in SDK v3.0.73+), the SDK registers for Android's Activity.ScreenCaptureCallback. When the OS detects a capture attempt, the SDK sends a report to the Inkrypt backend, this is in addition to FLAG_SECURE blocking the actual capture.
The detection is a notification only, it does not stop playback and does not show an error to the user. The report is visible in your Inkrypt Dashboard.
Requirements
Use InkPlayerFragmentV34 instead of InkPlayerFragment in your layout on Android 14+ targets.
// Android 14+ — use InkPlayerFragmentV34
val fragment = InkPlayerFragmentV34()
// Android 13 and below — use the base class
val fragment = InkPlayerFragment()
If you are already targeting Android 14 across your app, you can always use InkPlayerFragmentV34, it extends InkPlayerFragment and the capture callback is only registered on API 34+.
Developer Mode Detection
The SDK detects when a device has Android Developer Options or USB Debugging enabled, and blocks playback when these are active.
What it does
When the player is in the foreground, the SDK checks whether Developer Options or ADB is enabled on the device. If either is detected:
- Playback is paused immediately.
- An in-player dialog is shown guiding the user to disable the option.
- A report is sent to the Inkrypt backend.
- When the user disables the setting and returns to the app, the SDK detects the change automatically and resumes playback.
The specific error codes shown are:
9202: USB Debugging enabled (takes precedence)9201: Developer Options enabled
Integration notes
During development, bypass this check using setTolerateDeveloperMode(true) on InkInitParams.Builder. This prevents the developer-mode overlay from blocking your own testing:
val params = InkInitParams.Builder()
.setVideoId("...")
.setOtp("...")
.setTolerateDeveloperMode(true) // dev/debug builds only
.build()
Never ship setTolerateDeveloperMode(true) in production. It disables a security gate that protects your content.
Exceptions for specific devices
The SDK contains hard-coded exceptions for a small number of device models that cannot disable Developer Options or USB Debugging due to firmware limitations (e.g. Realme C61, Realme C67). On these devices, the relevant check is automatically suppressed. You do not need to do anything for these exceptions.
Summary
| Feature | Enabled in | Required action |
|---|---|---|
Screen capture blocking (FLAG_SECURE) | Release builds (automatic) | None. Enabled automatically in release |
| Screen capture detection | Android 14+, using InkPlayerFragmentV34 | Use InkPlayerFragmentV34 on Android 14+ targets |
| Developer mode detection | All builds (runtime check) | Use setTolerateDeveloperMode(true) in dev builds only |