Skip to content

Screen recording detection

iOS only. Android offers no reliable signal on the versions the SDK supports, so the Android answers are null and no events fire.

final recorded = await DeviceShield.isScreenRecorded();
// true / false on iOS, null where it can't be determined (Android)
DeviceShield.screenRecordingChanges.listen((isRecorded) {
// isRecorded: recording or mirroring started (true) or stopped (false)
});

Events fire only when the state changes. There’s no initial event, so call isScreenRecorded() once when your screen opens.

The SDK reads UIScreen.isCaptured, which is true during screen recording, AirPlay mirroring, and when an external display mirrors the screen. It can’t tell these apart.