react-native-ux-cam
React Native wrapper for UXCam.
Setup
yarn add react-native-ux-cam
npm install --save react-native-ux-cam
iOS with react-native and Cocoapods
Run the following:
react-native link react-native-ux-cam
Then, add the following to your Podfile:
pod "UXCam", "~> 2.5.8"
Then run:
pod install
You're done! :tada:
Android
Run the following:
react-native link react-native-ux-cam
Then add the following to your file android/app/build.gradle
(or add the maven url to your existing repositories section):
repositories {
maven {
url 'http://sdk.uxcam.com/android/'
}
}
And add this to your file android/app/src/main/AndroidManifest.xml
, inside your <application>
tag:
<service android:name="com.uxcam.service.HttpPostService"/>
Usage
import UXCam from 'react-native-ux-cam';
UXCam.startWithKey(key);
UXCam.tagScreenName('my screen');
UXCam.tagUserName('John Doe');
UXCam.addTag('logged-in', {
isLoggedIn: true,
isAwesome: true,
});
UXCam.markSessionAsFavorite();
const currentUserUrl = await UXCam.urlForCurrentUser();
const currentSessionUrl = await UXCam.urlForCurrentSession();
UXCam.occludeSensitiveScreen(true);
UXCam.occludeSensitiveScreen(false);
UXCam.stopApplicationAndUploadData();
UXCam.restartSession();
If a method is missing from the official SDK, please send a PR!