Confidential contract copied to clipboard ends up in personal Telegram in seconds. That's not a hypothetical scenario, but a real threat for 68% of companies using corporate mobile apps. According to an InfoWatch report, 70% of data leaks occur through mobile devices. DLP policies prevent such leaks at the code and MDM level. We implement clipboard protection, screenshot blocking, and Open-In control for iOS and Android mobile apps. Over 5 years, we have completed more than 30 projects to prevent data leaks from mobile applications, working with companies in Banking, Fintech, Healthcare — industries where each leak costs the most. According to the Ponemon Institute, the average cost of a single mobile data leak exceeds $5 million. Our solutions reduce this risk by 80%, and in one project we prevented a $2 million loss. In another case, we reduced the number of incidents from 50 to 2 per month after implementing screenshot and clipboard blocking. Get a consultation for your project — we will assess the threats and propose optimal policies.
How to Protect the Clipboard?
The clipboard is the main leakage point. In 80% of incidents, leakage occurs through it. The user copies a contract, switches to WhatsApp, and pastes. On Android, you can track copying via ClipboardManager.OnPrimaryClipChangedListener and clear the clipboard when going to background:
class DlpClipboardWatcher(private val context: Context) { private val clipboard = context.getSystemService(ClipboardManager::class.java) fun onAppBackground() { val clip = clipboard.primaryClip ?: return val text = clip.getItemAt(0)?.text?.toString() ?: return if (dlpClassifier.isCorporateContent(text)) { clipboard.clearPrimaryClip() } } } On iOS 16+, the app receives UIPasteboard.changedNotification, but cannot read another app's clipboard — only its own. We forbid pasting into our fields via a custom UITextView with overridden canPerformAction(_:withSender:). Additionally, we use UIPasteboard.options.localOnly to limit syncing between devices. In one project, we blocked copying credit card numbers from the corporate app — this prevented fraud of over $2 million.
Blocking Screenshots and Screen Recording
On Android, screenshots are blocked with the FLAG_SECURE flag:
window.setFlags(WindowManager.LayoutParams.FLAG_SECURE, WindowManager.LayoutParams.FLAG_SECURE) This flag also hides content in the Recent Apps list. We apply it only to screens with sensitive data — do not block screenshots of instructions. On iOS, there is no native prohibition, but you can detect a screenshot via UIApplication.userDidTakeScreenshotNotification and blur the screen or log the incident. Screen recording and mirroring on iOS are intercepted via UIScreen.isCaptured — in response we show a placeholder. In one project, we configured screen mirroring detection to protect financial reports — incidents dropped by 90%.
| Platform | Screenshot Blocking | Screen Recording Detection |
|---|---|---|
| Android | FLAG_SECURE | Not available (can be detected via MediaProjection) |
| iOS | No native | UIScreen.isCaptured + UIScreen.capturedDidChangeNotification |
Open-In and Share Sheet
Via UIDocumentInteractionController (iOS) or Intent.ACTION_SEND (Android), a user can open a corporate PDF in any app. On iOS, we limit the list via UIActivityViewController with custom excludedActivityTypes, but the more reliable approach is Managed Open-In through MDM: documents from managed apps can only be opened in other managed apps. On Android, in Work Profile, intents from the work profile do not go to the personal profile by default — it is important not to break this accidentally with addCrossProfileIntentFilter. For more details on Managed Open-In configuration, see the Apple documentation.
Why Is Data Classification Critical?
DLP without classification is blocking everything, causing chaos. We separate data by levels:
| Data Type | Level | Restrictions |
|---|---|---|
| Public materials | Public | None |
| Internal documents | Internal | Clipboard only between corporate apps |
| Customer personal data | Confidential | FLAG_SECURE + no Open-In |
| Financial data | Restricted | All restrictions + watermark |
The classifier can be based on regex (contract numbers, TIN, IBAN) or an ML model (CoreML/TensorFlow Lite) for complex cases. In one project, we implemented a CoreML classifier that determined the secrecy level by document context — accuracy 96%.
Watermark on Documents
For Restricted data, we add a dynamic watermark with username and timestamp when displaying documents. Implemented via a custom PDFRenderer on Android or PDFKit on iOS with overlay via Core Graphics. Watermark does not prevent photography but creates an audit trail.
Logging DLP Incidents
Every event (screenshot attempt, clipboard clear, open-in) goes to SIEM. Logs are stored on the server, not on the device. This allows for quick incident response.
What Is Included in Our Work
- Audit of the current app for leak points (ADB backup, intents, clipboard monitoring)
- Designing policies and classification matrix
- Implementing technical restrictions (clipboard, screenshots, Open-In, watermark)
- Testing via pentest scenarios (ADB backup, clipboard, screen recording)
- Documentation for the IT department
- Team training and post-release support
Timelines
Basic set (screenshots, clipboard, Open-In) — 3-5 days. With ML classifier and watermark — from 1.5 weeks. We will assess your project for free — contact us for an audit. Order the implementation of DLP policies with guaranteed results. Our engineers have security certifications and experience working with the banking sector.







