Skip to content
This repository has been archived by the owner on Jul 21, 2023. It is now read-only.

Latest commit

 

History

History
85 lines (56 loc) · 1.81 KB

readme.md

File metadata and controls

85 lines (56 loc) · 1.81 KB

react-native-lookback

React Native wrapper for Lookback.

Setup

# Yarn
yarn add react-native-lookback

OR

# NPM
npm install --save react-native-lookback

iOS with react-native and Cocoapods

Run the following:

react-native link react-native-lookback

Then, add the following to your Podfile:

pod "LookbackSafe", "~> 1.4.1"

Then run:

pod install

You're done! 🎉

NOTE: I'm working on using the podspec within this project to automatically link the LookbackSafe framework. Currently talking with the Lookback team to support this use case!

Android

Coming soon!

Usage

// Import the module:
import Lookback from 'react-native-lookback';

// Initialize using your appToken.
Lookback.startWithAppToken(token);

// Start Recording
Lookback.startRecordingWithOptions({
  showPreview: true, // When true, will show the Lookback interface for the user to watch / upload the recording.
  cameraEnabled: true, // When true, will record the user using the front facing camera.
  microphoneEnabled: true, // When true, will record audio with the recording.
});

// Stop Recording
Lookback.stopRecording();

// Toggle Show the Feedback Bubble.
Lookback.setFeedbackBubbleVisible(true);

// Toggle shake to record.
Lookback.setShakeToRecord(true);

// Toggle the Introduction Dialogs.
Lookback.setShowIntroductionDialogs(true);

// Open the ViewController with the list of uploads pending / completed.
// NOTE: This currently is presented using the rootViewController and does not have a back / done button to close it :(
Lookback.showLookbackUploads();

// Track entering a custom view.
Lookback.enteredView('my-view');

// Track exiting a custom view.
Lookbac.exitedView('my-view');

If a method is missing from the official SDK, please send a PR!