Detect screenshots on Android apps running on Chromebook

109 Views Asked by At

I have a react native android application running on Chrome OS. Usually the android app calls a function to disable screenshots on phones like this:

    NativeModules.FlagSecure.activate();

However, this approach doesn't do anything on Chrome OS; I am able to use the screenshot functionality with Ctrl + Show Windows and with the shift-modifier. How would I go about detecting screenshot activity or screen recording on Chrome OS?

1

There are 1 best solutions below

0
On

The solution was to add this flag to a java module.

  public static final int FLAG_SECURE