Pause & Resume Recording

Pause & Resume Recording

Temporarily pause screen recording for sensitive flows (e.g., payment entry, biometric authentication) without stopping the entire session. The session continues, but no frames are captured while paused.

API Reference

import RNUxcam from 'react-native-ux-cam';

// Pause recording — frames stop being captured
RNUxcam.pauseScreenRecording();

// Resume recording — frames captured again
RNUxcam.resumeScreenRecording();

Use Cases

Sensitive Flow Protection

import { useFocusEffect } from '@react-navigation/native';
import RNUxcam from 'react-native-ux-cam';

function PaymentScreen() {
  useFocusEffect(
    React.useCallback(() => {
      // Pause recording while on payment screen
      RNUxcam.pauseScreenRecording();
      RNUxcam.tagScreenName('Payment Entry');

      return () => {
        // Resume when leaving the screen
        RNUxcam.resumeScreenRecording();
      };
    }, [])
  );

  return (/* Payment form */);
}

Conditional Pause

const handleSensitiveAction = (isSensitive) => {
  if (isSensitive) {
    RNUxcam.pauseScreenRecording();
  } else {
    RNUxcam.resumeScreenRecording();
  }
};

When to Use Pause vs Occlusion

ApproachWhat HappensBest For
Pause/ResumeNo frames captured at allHighly sensitive flows where no visual data should exist
Screen OcclusionFrames captured but blurred/overlaidAnalytics still needed (gestures, timing) but content hidden
View-Level OcclusionSpecific views hiddenOnly certain fields are sensitive
💡

Tip: Prefer screen-based occlusion (blur/overlay) when you still want gesture analytics. Use pause/resume only when absolutely no frames should be recorded.