Start/Stop Recording

If you want to start recording when the application launches, start recording during the SDK initialization in App.tsx file.


import {config, startRecording } from 'vwo-insights-react-native-sdk';

React.useEffect(() => {
 
    // Auto Start after Lunch in both Platform Android & ios.
    startRecording()

 }, []);


If you want to start recording based on a user action, such as tapping a button, use the following code snippet:

import {startRecording } from 'vwo-insights-react-native-sdk';

// on button Click Event
onPress =() => {
  
		startRecording()

}


If you want to stop recording based on a user action, such as tapping a button, use the following code snippet:

import { stopRecording } from 'vwo-insights-react-native-sdk';

// on button Click Event
onPress =() => {
	
  stopRecording()

}