CELLHUBS.APP
Language: EN
Explore apps

Why Some Android Apps Block Screenshots (FLAG_SECURE Explained)

· tips · flag_secure · android screenshot · app security · android testing

You press the screenshot buttons and get a toast like “Couldn’t save screenshot” or “Can’t take screenshot due to security policy”. Or the screenshot saves, but the app area is pure black. Screen recordings do the same thing, and so does mirroring the phone to a computer.

This is not a bug in your phone. The app has asked Android to protect its window, using a flag called FLAG_SECURE. This post explains what it does, why apps use it, what you can do as a user, and how developers and QA teams work with it. It does not cover ways to defeat the protection, because the protection exists for good reasons.

What FLAG_SECURE is

Android apps draw their content in windows. Any window can carry a set of flags, and FLAG_SECURE tells the system that the content is sensitive. According to the Android developer documentation, a secure window should not appear in screenshots or on non-secure displays.

In practice that means:

The behaviour applies to every capture path, including ADB-based tools. When you mirror a phone in ADB Kit, expect secure screens to show black in the live view, screenshots and recordings, exactly as they would on the phone.

Which apps use it, and why

You will most often meet FLAG_SECURE in:

The reasoning is simple. Screenshots end up in cloud backups, chat threads and shared albums. Malicious apps that abuse screen capture or accessibility access could read what is on screen. Marking a window as secure removes a whole class of leaks with one line of code.

What you can do as a user

If you genuinely need a record of something on a protected screen, these legitimate options usually work:

  1. Use the app’s own export or share feature. Banking apps typically offer statement downloads or transaction receipts as PDF. That is a better record than a screenshot anyway.
  2. Check the web version. Your bank’s or provider’s website may let you download or print the same information.
  3. Write it down or request it. For support cases, the provider can often see the same data on their side if you give them a reference number.
  4. Ask the developer. If a screen blocks capture when it does not seem necessary, send feedback. Only the developer can change it.

Do not install apps or modules that promise to remove the block. They typically need deep system access, which is exactly the kind of risk the flag is designed to protect against.

What developers should know

If you build Android apps, FLAG_SECURE is a simple and effective tool, but use it deliberately.

Setting the flag

In an activity, set it on the window, typically in onCreate:

window.setFlags(
    WindowManager.LayoutParams.FLAG_SECURE,
    WindowManager.LayoutParams.FLAG_SECURE
)

Apply it only to the screens that need it, such as login, payment or secret-display screens. Blocking every screen frustrates users who want to share an error message with support.

Detecting instead of blocking

Since Android 14, apps can register a screenshot detection callback for an activity. The app is notified when the user takes a screenshot with the device’s buttons while that activity is visible, but it receives no image. This suits screens where a screenshot is acceptable but you want to warn the user or log the event. A window with FLAG_SECURE does not trigger this callback, because the screenshot is not taken in the first place.

Plan for QA

Secure screens make bug reports harder. Agree with your team on a debug or QA build configuration where the flag is controlled by a build setting, and keep it on in release builds. Document this so testers know why captures from the store build are black.

How QA testers can report bugs on secure screens

When you cannot capture the screen, the rest of the evidence matters more:

  1. Stream logcat while you reproduce the issue. Errors and stack traces are captured even when pixels are not. Our guide to reading Android logcat explains levels, tags and filters.
  2. Capture the screens around it. Record the steps leading up to the protected screen and the screen you land on afterwards.
  3. Write precise steps, including device model, Android version and app version.
  4. Ask for a QA build if the team provides one, and capture the issue there.

ADB Kit helps with the parts that are allowed: live logcat with filters and export, screenshots with markup, screen recording and APK install for QA builds, all from the browser. See better Android bug reports for QA testers for a complete template.

Quick answers

Is my phone broken? No. Other apps will screenshot normally.

Does it affect notifications? The flag applies to the app’s window. Notifications are drawn separately by the system.

Can my company enforce it? Yes. Work profile and device management policies can block capture for managed apps.

Summary

A black screenshot means the app marked its window as secure. It protects sensitive data from leaking through captures, recordings and mirroring, and it applies to every tool, including ADB-based ones. Use the app’s export features for records, and if you are on the testing side, rely on logs, surrounding captures and QA builds.

To collect logs, screenshots and recordings for everything else, try ADB Kit in your browser. It is free and needs no account.

FAQ

Why is my Android screenshot black?

The app on screen has marked its window as secure with FLAG_SECURE. Android then keeps that window out of screenshots and off non-secure displays, so captures and recordings show black or blank areas, or the phone refuses the screenshot.

Is it possible to remove the screenshot block?

The block is a deliberate protection set by the app, usually to protect financial, medical or private data. We do not cover ways around it. Use the app's own export or share feature, or ask the developer, who controls the setting.

How do testers capture bugs on a secure screen?

The usual approach is a debug or QA build where the development team turns the flag off by design, combined with logcat and written reproduction steps. Release builds keep the protection.

ADB Kit

A local-first workspace for Android in your browser and on your phone: mirror and control a device, capture screenshots and recordings, install APKs, stream logcat and move files over USB or Wi-Fi.

View app →

More guides