New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

nativescript-uxcam

Package Overview
Dependencies
Maintainers
3
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nativescript-uxcam - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

platforms/android/include.gradle

1

CHANGELOG.md

@@ -7,2 +7,3 @@ # Changelog

---------- | ---------- | ----------
1.0.1 | 2023-03-03 | Added option for configuration and occlusion while startup
1.0.0 | 2021-05-24 | First full release

@@ -9,0 +10,0 @@ 1.0.0-beta.4 | 2021-04-05 | Session not recording issue (Android) fixed

var UXCam = com.uxcam.UXCam
var UXConfig = com.uxcam.datamodel.UXConfig;
var UXCamBlur = com.uxcam.screenshot.model.UXCamBlur;
var UXCamOverlay = com.uxcam.screenshot.model.UXCamOverlay;
var UXCamOccludeAllTextFields = com.uxcam.screenshot.model.UXCamOccludeAllTextFields;

@@ -9,16 +13,112 @@ // <=v6.1

const PLUGIN_NAME = "nativescript";
const PLUGIN_VERSION = "1.0.1";
export class NSUXCam {
static startWithKey(apiKey) {
if (UXCam) {
UXCam.pluginType("nativescript", "1.0.0")
UXCam.startWithKey(apiKey);
} else {
console.log("UXCam: Cannot find UXCam package");
/**
* This will start the UXCam system, get the settings configurations from our server and start capturing the data according to the configuration.
*
* @brief Start the UXCam session
* @parameter configuration The configuration to identify your UXCam app - find appKey in the UXCam dashboard for your account
*/
static startWithConfiguration(configuration) {
UXCam.pluginType(PLUGIN_NAME, PLUGIN_VERSION);
var uxConfigBuilder = new UXConfig.Builder(configuration.userAppKey);
if (configuration.enableMultiSessionRecord !== undefined) {
uxConfigBuilder.enableMultiSessionRecord(configuration.enableMultiSessionRecord);
}
if (configuration.enableCrashHandling !== undefined)
uxConfigBuilder.enableCrashHandling(configuration.enableCrashHandling);
if (configuration.enableAutomaticScreenNameTagging !== undefined)
uxConfigBuilder.enableAutomaticScreenNameTagging(configuration.enableAutomaticScreenNameTagging);
if (configuration.enableImprovedScreenCapture !== undefined) {
uxConfigBuilder.enableImprovedScreenCapture(configuration.enableImprovedScreenCapture);
}
if (configuration.occlusions) {
var occlusionList = new java.util.ArrayList();
for (let occlusion of configuration.occlusions) {
var occlusionBuilder = this.occlusionBuilderForOcclusion(occlusion);
if (occlusion.screens !== undefined) {
var screens = new java.util.Arrays.asList(occlusion.screens);
occlusionBuilder.screens(screens);
}
if (occlusion.excludeMentionedScreens !== undefined) {
occlusionBuilder.excludeMentionedScreens(occlusion.excludeMentionedScreens);
}
// Hide gestures is not available for textfield occlusion
if (occlusion.hideGestures !== undefined && occlusion.type > 1) {
occlusionBuilder.withoutGesture(occlusion.hideGestures);
}
const occlusionSetting = occlusionBuilder.build();
occlusionList.add(occlusionSetting);
}
uxConfigBuilder.occlusions(occlusionList);
}
var config = uxConfigBuilder.build();
UXCam.startWithConfigurationCrossPlatform(applicationModule.android.startActivity, config);
}
static occlusionBuilderForOcclusion(occlusion) {
var occlusionBuilder;
switch (occlusion.type || 3) {
case 3:
let blurRadius = occlusion.blurRadius || 10;
occlusionBuilder = new UXCamBlur.Builder();
occlusionBuilder.blurRadius(blurRadius);
break;
case 2:
occlusionBuilder = new UXCamOverlay.Builder();
break;
case 1:
occlusionBuilder = new UXCamOccludeAllTextFields.Builder();
break;
default:
occlusionBuilder = new UXCamBlur.Builder();
}
return occlusionBuilder;
}
static async configurationForUXCam() {
return UXCam.configurationForUXCam();
}
static updateConfiguration(configuration) {
UXCam.updateConfiguration(configuration);
}
static applyOcclusion(occlusion) {
UXCam.applyOcclusion(occlusion);
}
static removeOcclusion(occlusion) {
UXCam.removeOcclusion(occlusion);
}
/**
* @deprecated Use {@link #startWithConfiguration(configuration)} instead to start new session
*
* @brief Start the UXCam session
* @parameter userAppKey The key to identify your UXCam app - find it in the UXCam dashboard for your account
*/
static startWithKey(appKey) {
const configuration = { userAppKey: appKey };
NSUXCam.startWithConfiguration(configuration);
}
/**
* Starts a new session after the {@link #stopSessionAndUploadData()} method has been called.
* This happens automatically when the app returns from background.
*/
static startNewSession() {
UXCam.startNewSession();
UXCam.startNewSession();
}
/**
* Stop current uxcam session and send captured data to server.<br>
* Use this to start sending the data on UXCam server without the app going into the background.<br>
* This starts an asynchronous process and returns immediately.
*/
static stopSessionAndUploadData() {

@@ -28,19 +128,48 @@ UXCam.stopSessionAndUploadData();

static urlForCurrentSession() {
return UXCam.urlForCurrentSession();
/**
* Returns a URL path that shows the current session when it compeletes
*
* @note This can be used for tying in the current session with other analytics systems
*
* @return url path for current session or nil if no verified session is active
*/
static async urlForCurrentSession() {
return UXCam.urlForCurrentSession();
}
static urlForCurrentUser() {
/**
* Returns a URL path for showing all the current users sessions
*
* @note This can be used for tying in the current user with other analytics systems
*
* @return url path for user session or nil if no verified session is active
*/
static async urlForCurrentUser() {
return UXCam.urlForCurrentUser();
}
/**
Hide / un-hide the whole screen from the recording
Call this when you want to hide the whole screen from being recorded - useful in situations where you don't have access to the exact view to occlude
Once turned on with a `true` parameter it will continue to hide the screen until called with `false`
@parameter hideScreen Set `true` to hide the screen from the recording, `false` to start recording the screen contents again
@parameter hideGesture Set `true` to hide the gestures in the screen from the recording, `false` to start recording the gestures in the screen again
*/
static occludeSensitiveScreen(hideScreen, hideGesture) {
if (hideGesture) {
if(typeof hideGesture !== "undefined"){
UXCam.occludeSensitiveScreen(hideScreen, hideGesture);
} else {
UXCam.occludeSensitiveScreen(hideScreen);
}else{
UXCam.occludeSensitiveScreen(hideScreen, true);
}
}
/**
Hide / un-hide all UITextField views on the screen
Call this when you want to hide the contents of all UITextFields from the screen capture. Default is `false`.
@parameter occludeAll Set `true` to hide all UITextField views on the screen in the recording, `false` to stop occluding them from the screen recording.
*/
static occludeAllTextFields(occludeAll) {

@@ -50,2 +179,8 @@ UXCam.occludeAllTextFields(occludeAll);

/**
UXCam uses a unique number to tag a device.
You can set a user identity for a device allowing you to more easily search for it on the dashboard and review their sessions further.
@parameters userIdentity String to apply to this user (device) in this recording session
*/
static setUserIdentity(userIdentity) {

@@ -55,2 +190,10 @@ UXCam.setUserIdentity(userIdentity);

/**
Add a key/value property for this user
@parameter propertyName Name of the property to attach to the user
@parameter value A value to associate with this property
@note Only number and string value types are supported to a maximum size per entry of 1KiB
*/
static setUserProperty(propertyName, value) {

@@ -60,2 +203,10 @@ UXCam.setUserProperty(propertyName, value);

/**
Add a single key/value property to this session
@parameter propertyName Name of the property to attach to the session recording
@parameter value A value to associate with this property
@note Only number and string value types are supported to a maximum size per entry of 1KiB
*/
static setSessionProperty(propertyName, value) {

@@ -65,14 +216,35 @@ UXCam.setSessionProperty(propertyName, value);

static logEvent(eventName) {
UXCam.logEvent(eventName);
}
static logEventWithProperties(eventName, properties) {
var androidProps = new org.json.JSONObject();
for (var key in properties) {
androidProps.put(key + "", properties[key] + "");
/**
Insert a general event, with associated properties, into the timeline - stores the event with the timestamp when it was added.
@parameter eventName Name of the event to attach to the session recording at the current time
@parameter properties An Object of properties to associate with this event
@note Only number and string property types are supported to a maximum count of 100 and maximum size per entry of 1KiB
*/
static logEvent(eventName, properties) {
if(typeof properties !== "undefined" || properties !== null){
UXCam.logEvent(eventName, properties);
}else{
UXCam.logEvent(eventName);
}
UXCam.logEvent(eventName, androidProps)
}
/**
* @brief Call this before calling startWithKey to disable UXCam from capturing sessions that crash
*
* @param disable `true` to disable crash capture
* @note By default crash handling is enabled.
*/
static disableCrashHandling(disable)
{
UXCam.disableCrashHandling(disable);
}
/**
* Returns the current recording status
*
* @return `true` if the session is being recorded
*/
static isRecording() {

@@ -82,2 +254,5 @@ return UXCam.isRecording();

/**
* Pause the screen recording
*/
static pauseScreenRecording() {

@@ -87,2 +262,5 @@ UXCam.pauseScreenRecording();

/**
* Resumes a paused session - will cancel any remaining pause time and resume screen recording
*/
static resumeScreenRecording() {

@@ -92,2 +270,6 @@ UXCam.resumeScreenRecording();

/**
* This will cancel any current session recording and opt this device out of future session recordings until `optInOverall` is called
* @note The default is to opt-in to session recordings, but not to screen recordings, and the defaults will be reset if the user un-installs and re-installs the app
*/
static optOutOverall() {

@@ -97,34 +279,80 @@ UXCam.optOutOverall();

static optOutOfSchematicRecordings() {
/**
* @brief iOS only.
* This will opt this device out of schematic recordings for future sessions
* - any current session will be stopped and restarted with the last settings passed to `startWithKey`
*/
static optOutOfSchematicRecordings()
{
// IOS only API - Placeholder function
}
static optInOverall() {
/**
* This will opt this device into session recordings
* - any current session will be stopped and a new session will be started with the last settings passed to `startWithKey`
*/
static optInOverall()
{
UXCam.optInOverall();
}
static optIntoSchematicRecordings() {
/**
* @brief iOS only.
* This will opt this device back into session recordings
*/
static optIntoSchematicRecordings()
{
// IOS only API - Placeholder function
}
static optIntoVideoRecording() {
UXCam.optIntoVideoRecording();
/**
* Returns the opt-in status of this device
* @return `true` if the device is opted in to session recordings, `false` otherwise. The default is `false`.
*/
static optInOverallStatus()
{
return UXCam.optInOverallStatus();
}
static optOutOfVideoRecording() {
UXCam.optOutOfVideoRecording();
/**
* @brief iOS only.
* Returns the opt-in status of this device for schematic recordings
* @returns `true` if the device is opted in to schematic recordings, `false` otherwise. The default is `false`.
* @note Use in conjunction with optInOverallStatus to control the overall recording status for the device
*/
static optInSchematicRecordingStatus()
{
return UXCam.optInOverallStatus();
}
static optInVideoRecordingStatus() {
return UXCam.optInVideoRecordingStatus();
/**
* @brief Android only.
* This will opt this device into video recording for future sessions.
*/
static optIntoVideoRecording() {
UXCam.optIntoSchematicRecordings();
}
static optInOverallStatus() {
return UXCam.optInOverallStatus();
/**
* @brief Android only.
* This will opt this device out of video recording for future sessions.
*/
static optOutOfVideoRecording() {
UXCam.optOutOfSchematicRecordings();
}
static optInSchematicRecordingStatus() {
return UXCam.optInOverallStatus();
/**
* @brief Android only.
* Returns the opt-in video status of this device
* @return `true` if the device is opted in for video recordings, `false` otherwise.
*/
static optInVideoRecordingStatus(){
return UXCam.optInVideoRecordingStatus();
}
/**
* Cancels the recording of the current session and discards the data
*
* @note A new session will start as normal when the app nexts come out of the background (depending on the state of the MultiSessionRecord flag), or if you call `startNewSession`
*/
static cancelCurrentSession() {

@@ -134,6 +362,30 @@ UXCam.cancelCurrentSession();

/**
* By default UXCam will end a session immediately when your app goes into the background. But if you are switching over to another app for authorisation, or some other short action, and want the session to continue when the user comes back to your app then call this method with a value of `true` before switching away to the other app.
* UXCam will pause the current session as your app goes into the background and then continue the session when your app resumes. If your app doesn't resume within a couple of minutes the original session will be closed as normal and a new session will start when your app eventually is resumed.
*
* @brief Prevent a short trip to another app causing a break in a session
* @param continueSession Set to `true` to continue the current session after a short trip out to another app. Default is `false` - stop the session as soon as the app enters the background.
* @param continueSession For android, you can also add time to wait in `milliseconds` before finishing the session.
*/
static allowShortBreakForAnotherApp(continueSession) {
UXCam.allowShortBreakForAnotherApp(continueSession);
if (typeof continueSession === 'boolean') {
UXCam.allowShortBreakForAnotherApp(continueSession);
} else if (typeof continueSession === 'number') {
UXCam.allowShortBreakForAnotherAppInMillis(continueSession);
} else {
UXCam.allowShortBreakForAnotherApp(true);
}
}
/**
* @brief Resume after short break. Only used in android, does nothing on iOS
*/
static resumeShortBreakForAnotherApp() {
UXCam.allowShortBreakForAnotherApp(false);
}
/**
* Get whether UXCam is set to automatically record a new session when the app resumes from the background
*/
static getMultiSessionRecord() {

@@ -143,2 +395,8 @@ return UXCam.getMultiSessionRecord();

/**
* Set whether to record multiple sessions or not
*
* @parameter multiSessionRecord `true` to record a new session automatically when the device comes out of the background. If `false` then a single session is recorded, when stopped (either programmatically with `stopApplicationAndUploadData` or by the app going to the background) then no more sessions are recorded until `startWithKey` is called again).
* @note The default setting is to record a new session each time a device comes out of the background. This flag can be set to `false` to stop that. You can also set this with the appropriate startWithKey: variant. (This will be reset each time startWithKey is called)
*/
static setMultiSessionRecord(multiSessionRecord) {

@@ -148,2 +406,6 @@ UXCam.setMultiSessionRecord(multiSessionRecord);

/**
* @brief Deletes any sessions that are awaiting upload
* @note Advanced use only. This is not needed for most developers. This can't be called until UXCam startWithKey: has completed
*/
static deletePendingUploads() {

@@ -153,2 +415,7 @@ UXCam.deletePendingUploads();

/**
* @brief Returns how many sessions are waiting to be uploaded
*
* Sessions can be in the Pending state if UXCam was unable to upload them at the end of the last session. Normally they will be sent at the end of the next session.
*/
static pendingSessionCount() {

@@ -158,8 +425,18 @@ return UXCam.pendingSessionCount();

/**
* @brief IOS only. Uploads sessions that were pending to be uploaded
*
* Sessions can be in the Pending state if UXCam was unable to upload them at the end of the last session. Normally they will be sent at the end of the next session.
*/
static uploadPendingSession() {
// IOS only API - Placeholder function
return UXCam.uploadPendingSession();
}
static occludeSensitiveView(sensitiveView) {
if (sensitiveView) {
/**
* Hide a view that contains sensitive information or that you do not want recording on the screen video.
*
* @parameter sensitiveView The view to occlude in the screen recording
*/
static occludeSensitiveView(sensitiveView){
if (sensitiveView){
UXCam.occludeSensitiveView(sensitiveView.nativeView);

@@ -169,4 +446,10 @@ }

static unOccludeSensitiveView(sensitiveView) {
if (sensitiveView) {
/**
* Stop hiding a view that was previously hidden
* If the view passed in was not previously occluded then no action is taken and this method will just return
*
* @parameter view The view to show again in the screen recording
*/
static unOccludeSensitiveView(view){
if (view){
UXCam.unOccludeSensitiveView(sensitiveView.nativeView);

@@ -176,4 +459,9 @@ }

static occludeSensitiveViewWithoutGesture(sensitiveView) {
if (sensitiveView) {
/**
* Hide a view that contains sensitive information or that you do not want recording on the screen video.
*
* @parameter sensitiveView The view to occlude in the screen recording
*/
static occludeSensitiveViewWithoutGesture(sensitiveView){
if (sensitiveView){
UXCam.occludeSensitiveViewWithoutGesture(sensitiveView.nativeView);

@@ -183,2 +471,10 @@ }

/**
UXCam normally captures the view controller name automatically but in cases where it this is not sufficient (such as in OpenGL applications)
or where you would like to set a different unique name, use this function to set the name.
@note Call this in `[UIViewController viewDidAppear:]` after the call to `[super ...]` or automatic screen name tagging will override your value
@parameter screenName Name to apply to the current screen in the session video
*/
static tagScreenName(screenName) {

@@ -188,2 +484,9 @@ UXCam.tagScreenName(screenName);

/**
Enable / disable the automatic tagging of screen names
@note By default UXCam will tag new screen names automatically. You can override this using the `tagScreenName` method or use this method to disable the automatic tagging.
@parameters autoScreenTagging Set to `true` to enable automatic screen name tagging (the default) or `false` to disable it
*/
static setAutomaticScreenNameTagging(autoScreenTagging) {

@@ -193,41 +496,86 @@ UXCam.setAutomaticScreenNameTagging(autoScreenTagging);

static addScreenNameToIgnore(screenName) {
/**
Add a name to the list of screens names that wont be added to the timeline in automatic screen name tagging mode
This will not impact gesture or action recording - just that the timeline on the dashboard will not contain an entry for this screen name if it appears after this call.
Use this if you have view controllers that are presented but which are not primary user interaction screens to make your dashboard timeline easier to understand.
@param screenName A name to add to the list of screens to ignore
@note This is a convenience method for `addScreenNamesToIgnore([nameToIgnore])`
*/
static addScreenNameToIgnore(screenName){
UXCam.addScreenNameToIgnore(screenName);
}
static addScreenNamesToIgnore(screenName) {
UXCam.addScreenNamesToIgnore(screenName);
/**
Add a list of names to the list of screens names that wont be added to the timeline in automatic screen name tagging mode
This will not impact gesture or action recording - just that the timeline on the dashboard will not contain an entry for any of the screens in this list encountered after this call.
Use this if you have view controllers that are presented but which are not primary user interaction screens to make your dashboard timeline easier to understand.
@param screenNames A list of screen names to add to the ignore list
*/
static addScreenNamesToIgnore(screenNames){
UXCam.addScreenNamesToIgnore(screenNames);
}
static removeScreenNameToIgnore(screenName) {
/**
Remove the a name from the list of screens to be ignored in automatic screen name tagging mode
@param screenName The name to remove from the list of ignored screens
@note This is a convenience method for `removeScreenNamesToIgnore([nameToRemove])`
*/
static removeScreenNameToIgnore(screenName){
UXCam.removeScreenNameToIgnore(screenName);
}
static removeScreenNamesToIgnore(screenName) {
UXCam.removeScreenNamesToIgnore(screenName);
/**
Remove the a list of names from the list of screens to be ignored in automatic screen name tagging mode
@param screenNames A list of names to remove from the ignore list
*/
static removeScreenNamesToIgnore(screenNames){
UXCam.removeScreenNamesToIgnore(screenNames);
}
static removeAllScreenNamesToIgnore() {
// Remove all entries from the list of screen names to be ignored in automatic screen name tagging mode
static removeAllScreenNamesToIgnore(){
UXCam.removeAllScreenNamesToIgnore();
}
static screenNamesBeingIgnored() {
// Get the list of screen names that are being ignored in automatic screen name tagging mode
static screenNamesBeingIgnored(){
return UXCam.screenNamesBeingIgnored();
}
static setPushNotificationToken(pushToken) {
UXCam.setPushNotificationToken(pushToken);
/**
Set the token to be used to send push notifications to the app
@param token Push notification token
*/
static setPushNotificationToken(token){
UXCam.setPushNotificationToken(token);
}
static reportBugEvent(eventName) {
UXCam.reportBugEvent(eventName);
/**
Send a report of a problem your app encountered to be displayed in the dashboard
@param eventName Name of the problem event
@param properties Properties object associated with the event
@note Only number and string property types are supported to a maximum count of 100 and maximum size per entry of 1KiB
*/
static reportBugEvent(eventName, properties){
if(typeof properties !== "undefined" || properties !== null){
UXCam.reportBugEvent(eventName, properties);
}else{
UXCam.reportBugEvent(eventName);
}
}
static reportBugEventProperties(eventName, properties) {
var androidProps = new org.json.JSONObject();
for (var key in properties) {
androidProps.put(key + "", properties[key] + "");
}
UXCam.reportBugEvent(eventName, androidProps)
/**
Enable/Disable advanced gesture recognition like swipe and pinch gestures.
@param enable Set `true` to enable or `false` to disable before `startWithKey`. Default is `true`.
@note Disable this on iOS if you are having problems with swipes or other gestures being interrupted while recording sessions.
*/
static enableAdvancedGestureRecognizers(enable){
UXCam.enableAdvancedGestureRecognizers(enable);
}
}

165

index.d.ts

@@ -0,1 +1,3 @@

import UXOcclusion from "./UXOcclusion";
export declare class NSUXCam {

@@ -7,7 +9,35 @@

* @brief Start the UXCam session
* @parameter userAPIKey The key to identify your UXCam app - find it in the UXCam dashboard for your account
* @parameter configuration The configuration to identify your UXCam app - find appKey in the UXCam dashboard for your account
*/
static startWithKey: (apiKey: string) => void;
static startWithConfiguration: (configuration: UXConfiguration) => void;
/**
* @deprecated Use {@link #startWithConfiguration(configuration)} instead to start new session
*
* @brief Start the UXCam session
* @parameter userAppKey The key to identify your UXCam app - find it in the UXCam dashboard for your account
*/
static startWithKey: (appKey: string) => void;
/**
* Returns configuration object for current session
*/
static configurationForUXCam: () => Promise<UXConfiguration | undefined | null>;
/**
* Update current configuration with different values
*/
static updateConfiguration: (configuration: UXConfiguration) => void;
/**
* Apply manual occlusion to screens in the app.
* This will be applied to all the screens until it is not removed manually again using {@link #removeOcclusion(occlusion)} method
*/
static applyOcclusion: (occlusion: UXOcclusion) => void;
/**
* Remove manual occlusion from the app that was applied using {@link #applyOcclusion(occlusion)} method
*/
static removeOcclusion: (occlusion: UXOcclusion) => void;
/**
* Starts a new session after the {@link #stopSessionAndUploadData()} method has been called.

@@ -32,3 +62,3 @@ * This happens automatically when the app returns from background.

*/
static urlForCurrentSession: () => string | undefined | null;
static urlForCurrentSession: () => Promise<string | undefined | null>;

@@ -42,3 +72,3 @@ /**

*/
static urlForCurrentUser: () => string | undefined | null;
static urlForCurrentUser: () => Promise<string | undefined | null>;

@@ -54,3 +84,3 @@ /**

*/
static occludeSensitiveScreen(hideScreen: boolean, hideGesture?: boolean): void;
static occludeSensitiveScreen: (hideScreen: boolean, hideGesture?: boolean) => void;

@@ -64,2 +94,11 @@ /**

*/
static occludeAllTextView: () => void;
/**
Hide / un-hide all UITextField views on the screen
Call this when you want to hide the contents of all UITextFields from the screen capture. Default is `false`.
@parameter occludeAll Set `true` to hide all UITextField views on the screen in the recording, `false` to stop occluding them from the screen recording.
*/
static occludeAllTextFields: (occludeAll: boolean) => void;

@@ -96,9 +135,2 @@

/**
Insert a general event, into the timeline - stores the event with the timestamp when it was added.
@parameter eventName Name of the event to attach to the session recording at the current time
*/
static logEvent(eventName: string): void;
/**
Insert a general event, with associated properties, into the timeline - stores the event with the timestamp when it was added.

@@ -111,5 +143,19 @@

*/
static logEventWithProperties(eventName: string, properties: any): void;
static logEvent: (eventName: string, properties?: any) => void;
/**
UXCam verification listener that returns success/failure status. TRUE status means the session was successfully verified and started.
@parameter status Function to call that will receive verification status boolean value.
*/
static addVerificationListener: (status: (status: { success: boolean })=>void) => EmitterSubscription;
/**
* @brief Call this before calling startWithKey to disable UXCam from capturing sessions that crash
*
* @param disable `true` to disable crash capture
* @note By default crash handling is enabled.
*/
static disableCrashHandling: (disable: boolean) => void;
/**
* Returns the current recording status

@@ -155,12 +201,44 @@ *

/**
* This will opt this device into video recording for future sessions.
* Returns the opt-in status of this device
* @return `true` if the device is opted in to session recordings, `false` otherwise. The default is `false`.
*/
static optInOverallStatus: () => boolean;
/** Returns the opt-in status of this device for schematic recordings
* @returns `true` if the device is opted in to schematic recordings, `false` otherwise. The default is `false`.
* @note Use in conjunction with optInOverallStatus to control the overall recording status for the device
*/
static optInSchematicRecordingStatus: () => boolean;
/**
* @Deprecated use optOutOverall() instead
* This will cancel any current session recording and opt this device out of future session recordings until `optIn` is called
* @note The default is to opt-in to recordings, and the default will be reset if the user un-installs and re-installs the app
*/
static optOut: () => void;
/**
* @Deprecated use optInOverall() instead
*/
static optIn: () => void;
/**
* @Deprecated use optInOverallStatus() instead
*/
static optStatus: () => boolean;
/**
* @brief Android only.
* This will opt this device into video recording for future sessions.
*/
static optIntoVideoRecording: () => void;
/**
* This will opt this device out of video recording for future sessions.
*/
* @brief Android only.
* This will opt this device out of video recording for future sessions.
*/
static optOutOfVideoRecording: () => void;
/**
* @brief Android only.
* Returns the opt-in video status of this device

@@ -172,14 +250,2 @@ * @return `true` if the device is opted in for video recordings, `false` otherwise.

/**
* Returns the opt-in status of this device
* @return `true` if the device is opted in to session recordings, `false` otherwise. The default is `false`.
*/
static optInOverallStatus: () => boolean;
/** Returns the opt-in status of this device for schematic recordings
* @returns `true` if the device is opted in to schematic recordings, `false` otherwise. The default is `false`.
* @note Use in conjunction with optInOverallStatus to control the overall recording status for the device
*/
static optInSchematicRecordingStatus: () => boolean;
/**
* Cancels the recording of the current session and discards the data

@@ -197,6 +263,12 @@ *

* @param continueSession Set to `true` to continue the current session after a short trip out to another app. Default is `false` - stop the session as soon as the app enters the background.
* @param continueSession For android, you can also add time to wait in `milliseconds` before finishing the session.
*/
static allowShortBreakForAnotherApp: (continueSession: boolean) => void;
static allowShortBreakForAnotherApp: (continueSession: boolean | number) => void;
/**
* @brief Resume after short break. Only used in android, does nothing on iOS
*/
static resumeShortBreakForAnotherApp: () => void;
/**
* Get whether UXCam is set to automatically record a new session when the app resumes from the background

@@ -228,6 +300,6 @@ */

/**
* @brief IOS only. Uploads sessions that were pending to be uploaded
*
* Sessions can be in the Pending state if UXCam was unable to upload them at the end of the last session. Normally they will be sent at the end of the next session.
*/
* @brief IOS only. Uploads sessions that were pending to be uploaded
*
* Sessions can be in the Pending state if UXCam was unable to upload them at the end of the last session. Normally they will be sent at the end of the next session.
*/
static uploadPendingSession: () => void;

@@ -300,3 +372,2 @@

Remove the a name from the list of screens to be ignored in automatic screen name tagging mode
@param screenName The name to remove from the list of ignored screens

@@ -324,3 +395,3 @@ @note This is a convenience method for `removeScreenNamesToIgnore([nameToRemove])`

*/
static setPushNotificationToken: (pushToken: string) => void;
static setPushNotificationToken: (token: string) => void;

@@ -330,12 +401,24 @@ /**

@param eventName Name of the problem event
@param properties Properties object associated with the event
@note Only number and string property types are supported to a maximum count of 100 and maximum size per entry of 1KiB
*/
static reportBugEvent: (eventName: string) => void;
static reportBugEvent: (eventName: string, properties?: any) => void;
/**
Send a report of a problem your app encountered to be displayed in the dashboard
@param eventName Name of the problem event
@param properties Properties object associated with the event
@note Only number and string property types are supported to a maximum count of 100 and maximum size per entry of 1KiB
Enable/Disable advanced gesture recognition like swipe and pinch gestures.
@param enable Set `true` to enable or `false` to disable before `startWithKey`. Default is `true`.
@note Disable this on iOS if you are having problems with swipes or other gestures being interrupted while recording sessions.
*/
static reportBugEventProperties: (eventName: string, properties?: any) => void;
static enableAdvancedGestureRecognizers: (enable: boolean) => void;
}
export interface UXConfiguration {
userAppKey: string;
enableMultiSessionRecord?: boolean;
enableCrashHandling?: boolean;
enableAutomaticScreenNameTagging?: boolean;
enableAdvancedGestureRecognition?: boolean;
enableNetworkLogging?: boolean;
occlusions?: UXOcclusion[];
}
const PLUGIN_NAME = "nativescript";
const PLUGIN_VERSION = "1.0.1";
export class NSUXCam {
static startWithKey(apiKey) {
UXCam.pluginTypeVersion("nativescript", "1.0.0")
UXCam.startWithKey(apiKey);
/**
* This will start the UXCam system, get the settings configurations from our server and start capturing the data according to the configuration.
*
* @brief Start the UXCam session
* @parameter configuration The configuration to identify your UXCam app - find appKey in the UXCam dashboard for your account
*/
static startWithConfiguration(configuration) {
UXCam.pluginTypeVersion(PLUGIN_NAME, PLUGIN_VERSION);
const uxConfiguration = UXCamConfiguration.alloc().initWithAppKey(configuration.userAppKey);
uxConfiguration.enableMultiSessionRecord = configuration.enableMultiSessionRecord ?? true;
uxConfiguration.enableCrashHandling = configuration.enableCrashHandling ?? true;
uxConfiguration.enableAutomaticScreenNameTagging = configuration.enableAutomaticScreenNameTagging ?? true;
uxConfiguration.enableAdvancedGestureRecognition = configuration.enableAdvancedGestureRecognition ?? true;
uxConfiguration.enableNetworkLogging = configuration.enableNetworkLogging ?? false;
if (configuration.occlusions) {
var uxOcclusion = UXCamOcclusion.alloc().init();
for (let occlusion of configuration.occlusions) {
var occlusionSetting = this.occlusionSettingForOcclusion(occlusion);
occlusionSetting.hideGestures = occlusion.hideGestures || false;
var screens = occlusion.screens || [];
var exclude = occlusion.excludeMentionedScreens || false;
uxOcclusion.applySettingsScreensExcludeMentionedScreens([occlusionSetting], screens, exclude);
}
uxConfiguration.occlusion = uxOcclusion;
}
UXCam.startWithConfiguration(uxConfiguration);
}
static async configurationForUXCam() {
return UXCam.configurationForUXCam();
}
static updateConfiguration(configuration) {
UXCam.updateConfiguration(configuration);
}
static applyOcclusion(occlusion) {
const occlusionSetting = this.occlusionSettingForOcclusion(occlusion);
UXCam.applyOcclusion(occlusionSetting);
}
static occlusionSettingForOcclusion(occlusion) {
var occlusionSetting;
switch (occlusion.type || UXOcclusionType.Blur) {
case UXOcclusionType.Blur:
let blurRadius = occlusion.blurRadius || 10;
occlusionSetting = UXCamBlurSetting.alloc().initWithRadius(blurRadius);
break;
case UXOcclusionType.Overlay:
occlusionSetting = UXCamOverlaySetting.new();
break;
case UXOcclusionType.OccludeAllTextFields:
occlusionSetting = UXCamOccludeAllTextFields.new();
break;
default:
occlusionSetting = UXCamBlurSetting.new();
}
return occlusionSetting;
}
static removeOcclusion(occlusion) {
if (occlusion.type) {
UXCam.removeOcclusionOfType(occlusion.type);
} else {
UXCam.removeOcclusion();
}
}
/**
* @deprecated Use {@link #startWithConfiguration(configuration)} instead to start new session
*
* @brief Start the UXCam session
* @parameter userAppKey The key to identify your UXCam app - find it in the UXCam dashboard for your account
*/
static startWithKey(appKey) {
const configuration = { userAppKey: appKey };
NSUXCam.startWithConfiguration(configuration);
}
/**
* Starts a new session after the {@link #stopSessionAndUploadData()} method has been called.
* This happens automatically when the app returns from background.
*/
static startNewSession() {
UXCam.startNewSession();
UXCam.startNewSession();
}
/**
* Stop current uxcam session and send captured data to server.<br>
* Use this to start sending the data on UXCam server without the app going into the background.<br>
* This starts an asynchronous process and returns immediately.
*/
static stopSessionAndUploadData() {

@@ -16,20 +105,48 @@ UXCam.stopSessionAndUploadData();

static urlForCurrentSession() {
/**
* Returns a URL path that shows the current session when it compeletes
*
* @note This can be used for tying in the current session with other analytics systems
*
* @return url path for current session or nil if no verified session is active
*/
static async urlForCurrentSession() {
return UXCam.urlForCurrentSession();
}
static urlForCurrentUser() {
/**
* Returns a URL path for showing all the current users sessions
*
* @note This can be used for tying in the current user with other analytics systems
*
* @return url path for user session or nil if no verified session is active
*/
static async urlForCurrentUser() {
return UXCam.urlForCurrentUser();
}
/**
Hide / un-hide the whole screen from the recording
Call this when you want to hide the whole screen from being recorded - useful in situations where you don't have access to the exact view to occlude
Once turned on with a `true` parameter it will continue to hide the screen until called with `false`
@parameter hideScreen Set `true` to hide the screen from the recording, `false` to start recording the screen contents again
@parameter hideGesture Set `true` to hide the gestures in the screen from the recording, `false` to start recording the gestures in the screen again
*/
static occludeSensitiveScreen(hideScreen, hideGesture) {
if (hideGesture) {
UXCam.occludeSensitiveScreenHideGestures(hideScreen, hideGesture);
if(typeof hideGesture !== "undefined"){
UXCam.occludeSensitiveScreen(hideScreen, hideGesture);
}else{
UXCam.occludeSensitiveScreen(hideScreen, true);
}
else {
UXCam.occludeSensitiveScreen(hideScreen);
}
}
/**
Hide / un-hide all UITextField views on the screen
Call this when you want to hide the contents of all UITextFields from the screen capture. Default is `false`.
@parameter occludeAll Set `true` to hide all UITextField views on the screen in the recording, `false` to stop occluding them from the screen recording.
*/
static occludeAllTextFields(occludeAll) {

@@ -39,2 +156,8 @@ UXCam.occludeAllTextFields(occludeAll);

/**
UXCam uses a unique number to tag a device.
You can set a user identity for a device allowing you to more easily search for it on the dashboard and review their sessions further.
@parameters userIdentity String to apply to this user (device) in this recording session
*/
static setUserIdentity(userIdentity) {

@@ -44,18 +167,59 @@ UXCam.setUserIdentity(userIdentity);

/**
Add a key/value property for this user
@parameter propertyName Name of the property to attach to the user
@parameter value A value to associate with this property
@note Only number and string value types are supported to a maximum size per entry of 1KiB
*/
static setUserProperty(propertyName, value) {
UXCam.setUserPropertyValue(propertyName, value);
UXCam.setUserProperty(propertyName, value);
}
/**
Add a single key/value property to this session
@parameter propertyName Name of the property to attach to the session recording
@parameter value A value to associate with this property
@note Only number and string value types are supported to a maximum size per entry of 1KiB
*/
static setSessionProperty(propertyName, value) {
UXCam.setSessionPropertyValue(propertyName, value);
UXCam.setSessionProperty(propertyName, value);
}
static logEvent(eventName) {
UXCam.logEvent(eventName)
/**
Insert a general event, with associated properties, into the timeline - stores the event with the timestamp when it was added.
@parameter eventName Name of the event to attach to the session recording at the current time
@parameter properties An Object of properties to associate with this event
@note Only number and string property types are supported to a maximum count of 100 and maximum size per entry of 1KiB
*/
static logEvent(eventName, properties) {
if(typeof properties !== "undefined" || properties !== null){
UXCam.logEvent(eventName, properties);
}else{
UXCam.logEvent(eventName);
}
}
static logEventWithProperties(eventName, properties){
UXCam.logEventWithProperties(eventName, properties)
}
/**
* @brief Call this before calling startWithKey to disable UXCam from capturing sessions that crash
*
* @param disable `true` to disable crash capture
* @note By default crash handling is enabled.
*/
static disableCrashHandling(disable)
{
UXCam.disableCrashHandling(disable);
}
/**
* Returns the current recording status
*
* @return `true` if the session is being recorded
*/
static isRecording() {

@@ -65,2 +229,5 @@ return UXCam.isRecording();

/**
* Pause the screen recording
*/
static pauseScreenRecording() {

@@ -70,2 +237,5 @@ UXCam.pauseScreenRecording();

/**
* Resumes a paused session - will cancel any remaining pause time and resume screen recording
*/
static resumeScreenRecording() {

@@ -75,2 +245,6 @@ UXCam.resumeScreenRecording();

/**
* This will cancel any current session recording and opt this device out of future session recordings until `optInOverall` is called
* @note The default is to opt-in to session recordings, but not to screen recordings, and the defaults will be reset if the user un-installs and re-installs the app
*/
static optOutOverall() {

@@ -80,14 +254,50 @@ UXCam.optOutOverall();

static optOutOfSchematicRecordings() {
/**
* This will opt this device out of schematic recordings for future sessions
* - any current session will be stopped and restarted with the last settings passed to `startWithKey`
*/
static optOutOfSchematicRecordings()
{
UXCam.optOutOfSchematicRecordings();
}
static optInOverall() {
/**
* This will opt this device into session recordings
* - any current session will be stopped and a new session will be started with the last settings passed to `startWithKey`
*/
static optInOverall()
{
UXCam.optInOverall();
}
static optIntoSchematicRecordings() {
/**
* This will opt this device back into session recordings
*/
static optIntoSchematicRecordings()
{
UXCam.optIntoSchematicRecordings();
}
/**
* Returns the opt-in status of this device
* @return `true` if the device is opted in to session recordings, `false` otherwise. The default is `false`.
*/
static optInOverallStatus()
{
return UXCam.optInOverallStatus();
}
/** Returns the opt-in status of this device for schematic recordings
* @returns `true` if the device is opted in to schematic recordings, `false` otherwise. The default is `false`.
* @note Use in conjunction with optInOverallStatus to control the overall recording status for the device
*/
static optInSchematicRecordingStatus()
{
return UXCam.optInSchematicRecordingStatus();
}
/**
* @brief Android only.
* This will opt this device into video recording for future sessions.
*/
static optIntoVideoRecording() {

@@ -97,2 +307,6 @@ UXCam.optIntoSchematicRecordings();

/**
* @brief Android only.
* This will opt this device out of video recording for future sessions.
*/
static optOutOfVideoRecording() {

@@ -102,2 +316,7 @@ UXCam.optOutOfSchematicRecordings();

/**
* @brief Android only.
* Returns the opt-in video status of this device
* @return `true` if the device is opted in for video recordings, `false` otherwise.
*/
static optInVideoRecordingStatus(){

@@ -107,10 +326,7 @@ return UXCam.optInSchematicRecordingStatus();

static optInOverallStatus() {
return UXCam.optInOverallStatus();
}
static optInSchematicRecordingStatus() {
return UXCam.optInSchematicRecordingStatus();
}
/**
* Cancels the recording of the current session and discards the data
*
* @note A new session will start as normal when the app nexts come out of the background (depending on the state of the MultiSessionRecord flag), or if you call `startNewSession`
*/
static cancelCurrentSession() {

@@ -120,6 +336,30 @@ UXCam.cancelCurrentSession();

/**
* By default UXCam will end a session immediately when your app goes into the background. But if you are switching over to another app for authorisation, or some other short action, and want the session to continue when the user comes back to your app then call this method with a value of `true` before switching away to the other app.
* UXCam will pause the current session as your app goes into the background and then continue the session when your app resumes. If your app doesn't resume within a couple of minutes the original session will be closed as normal and a new session will start when your app eventually is resumed.
*
* @brief Prevent a short trip to another app causing a break in a session
* @param continueSession Set to `true` to continue the current session after a short trip out to another app. Default is `false` - stop the session as soon as the app enters the background.
* @param continueSession For android, you can also add time to wait in `milliseconds` before finishing the session.
*/
static allowShortBreakForAnotherApp(continueSession) {
UXCam.allowShortBreakForAnotherApp(continueSession);
if (typeof continueSession === 'boolean') {
UXCam.allowShortBreakForAnotherApp(continueSession);
} else if (typeof continueSession === 'number') {
UXCam.allowShortBreakForAnotherAppInMillis(continueSession);
} else {
UXCam.allowShortBreakForAnotherApp(true);
}
}
/**
* @brief Resume after short break. Only used in android, does nothing on iOS
*/
static resumeShortBreakForAnotherApp() {
UXCam.allowShortBreakForAnotherApp(false);
}
/**
* Get whether UXCam is set to automatically record a new session when the app resumes from the background
*/
static getMultiSessionRecord() {

@@ -129,2 +369,8 @@ return UXCam.getMultiSessionRecord();

/**
* Set whether to record multiple sessions or not
*
* @parameter multiSessionRecord `true` to record a new session automatically when the device comes out of the background. If `false` then a single session is recorded, when stopped (either programmatically with `stopApplicationAndUploadData` or by the app going to the background) then no more sessions are recorded until `startWithKey` is called again).
* @note The default setting is to record a new session each time a device comes out of the background. This flag can be set to `false` to stop that. You can also set this with the appropriate startWithKey: variant. (This will be reset each time startWithKey is called)
*/
static setMultiSessionRecord(multiSessionRecord) {

@@ -134,2 +380,6 @@ UXCam.setMultiSessionRecord(multiSessionRecord);

/**
* @brief Deletes any sessions that are awaiting upload
* @note Advanced use only. This is not needed for most developers. This can't be called until UXCam startWithKey: has completed
*/
static deletePendingUploads() {

@@ -139,10 +389,25 @@ UXCam.deletePendingUploads();

/**
* @brief Returns how many sessions are waiting to be uploaded
*
* Sessions can be in the Pending state if UXCam was unable to upload them at the end of the last session. Normally they will be sent at the end of the next session.
*/
static pendingSessionCount() {
return UXCam.pendingUploads();
return UXCam.pendingSessionCount();
}
/**
* @brief IOS only. Uploads sessions that were pending to be uploaded
*
* Sessions can be in the Pending state if UXCam was unable to upload them at the end of the last session. Normally they will be sent at the end of the next session.
*/
static uploadPendingSession() {
UXCam.uploadingPendingSessions(null);
return UXCam.uploadPendingSession();
}
/**
* Hide a view that contains sensitive information or that you do not want recording on the screen video.
*
* @parameter sensitiveView The view to occlude in the screen recording
*/
static occludeSensitiveView(sensitiveView){

@@ -154,2 +419,8 @@ if (sensitiveView){

/**
* Stop hiding a view that was previously hidden
* If the view passed in was not previously occluded then no action is taken and this method will just return
*
* @parameter sensitiveView The view to show again in the screen recording
*/
static unOccludeSensitiveView(sensitiveView){

@@ -160,3 +431,8 @@ if (sensitiveView){

}
/**
* Hide a view that contains sensitive information or that you do not want recording on the screen video.
*
* @parameter sensitiveView The view to occlude in the screen recording
*/
static occludeSensitiveViewWithoutGesture(sensitiveView){

@@ -168,2 +444,10 @@ if (sensitiveView){

/**
UXCam normally captures the view controller name automatically but in cases where it this is not sufficient (such as in OpenGL applications)
or where you would like to set a different unique name, use this function to set the name.
@note Call this in `[UIViewController viewDidAppear:]` after the call to `[super ...]` or automatic screen name tagging will override your value
@parameter screenName Name to apply to the current screen in the session video
*/
static tagScreenName(screenName) {

@@ -173,2 +457,9 @@ UXCam.tagScreenName(screenName);

/**
Enable / disable the automatic tagging of screen names
@note By default UXCam will tag new screen names automatically. You can override this using the `tagScreenName` method or use this method to disable the automatic tagging.
@parameters autoScreenTagging Set to `true` to enable automatic screen name tagging (the default) or `false` to disable it
*/
static setAutomaticScreenNameTagging(autoScreenTagging) {

@@ -178,37 +469,86 @@ UXCam.setAutomaticScreenNameTagging(autoScreenTagging);

/**
Add a name to the list of screens names that wont be added to the timeline in automatic screen name tagging mode
This will not impact gesture or action recording - just that the timeline on the dashboard will not contain an entry for this screen name if it appears after this call.
Use this if you have view controllers that are presented but which are not primary user interaction screens to make your dashboard timeline easier to understand.
@param screenName A name to add to the list of screens to ignore
@note This is a convenience method for `addScreenNamesToIgnore([nameToIgnore])`
*/
static addScreenNameToIgnore(screenName){
UXCam.addScreenNameToIgnore(screenName);
}
static addScreenNamesToIgnore(screenName){
UXCam.addScreenNamesToIgnore(screenName);
/**
Add a list of names to the list of screens names that wont be added to the timeline in automatic screen name tagging mode
This will not impact gesture or action recording - just that the timeline on the dashboard will not contain an entry for any of the screens in this list encountered after this call.
Use this if you have view controllers that are presented but which are not primary user interaction screens to make your dashboard timeline easier to understand.
@param screenNames A list of screen names to add to the ignore list
*/
static addScreenNamesToIgnore(screenNames){
UXCam.addScreenNamesToIgnore(screenNames);
}
/**
Remove the a name from the list of screens to be ignored in automatic screen name tagging mode
@param screenName The name to remove from the list of ignored screens
@note This is a convenience method for `removeScreenNamesToIgnore([nameToRemove])`
*/
static removeScreenNameToIgnore(screenName){
UXCam.removeScreenNameToIgnore(screenName);
}
static removeScreenNamesToIgnore(screenName){
UXCam.removeScreenNamesToIgnore(screenName);
/**
Remove the a list of names from the list of screens to be ignored in automatic screen name tagging mode
@param screenNames A list of names to remove from the ignore list
*/
static removeScreenNamesToIgnore(screenNames){
UXCam.removeScreenNamesToIgnore(screenNames);
}
static removeAllScreenNamesToIgnore() {
// Remove all entries from the list of screen names to be ignored in automatic screen name tagging mode
static removeAllScreenNamesToIgnore(){
UXCam.removeAllScreenNamesToIgnore();
}
static screenNamesBeingIgnored() {
// Get the list of screen names that are being ignored in automatic screen name tagging mode
static screenNamesBeingIgnored(){
return UXCam.screenNamesBeingIgnored();
}
static setPushNotificationToken(pushToken) {
UXCam.setPushNotificationToken(pushToken);
/**
Set the token to be used to send push notifications to the app
@param token Push notification token
*/
static setPushNotificationToken(token){
UXCam.setPushNotificationToken(token);
}
static reportBugEvent(eventName) {
UXCam.reportBugEventProperties(eventName, null);
/**
Send a report of a problem your app encountered to be displayed in the dashboard
@param eventName Name of the problem event
@param properties Properties object associated with the event
@note Only number and string property types are supported to a maximum count of 100 and maximum size per entry of 1KiB
*/
static reportBugEvent(eventName, properties){
if(typeof properties !== "undefined" || properties !== null){
UXCam.reportBugEvent(eventName, properties);
}else{
UXCam.reportBugEvent(eventName);
}
}
static reportBugEventProperties(eventName, properties) {
UXCam.reportBugEventProperties(eventName, properties);
/**
Enable/Disable advanced gesture recognition like swipe and pinch gestures.
@param enable Set `true` to enable or `false` to disable before `startWithKey`. Default is `true`.
@note Disable this on iOS if you are having problems with swipes or other gestures being interrupted while recording sessions.
*/
static enableAdvancedGestureRecognizers(enable){
UXCam.enableAdvancedGestureRecognizers(enable);
}
}
{
"name": "nativescript-uxcam",
"version": "1.0.0",
"version": "1.0.1",
"description": "NativeScript plugin for UXCam.",

@@ -5,0 +5,0 @@ "license": "MIT",

@@ -7,3 +7,3 @@ # NativeScript UXCam

NB: UXCam on iOS needs a minimum version of iOS 10.0
NB: UXCam on iOS needs a minimum version of iOS 11.0

@@ -15,6 +15,18 @@ ## Usage

```javascript
import {NSUXCam} from 'nativescript-uxcam';
import { NSUXCam } from 'nativescript-uxcam';
NSUXCam.optIntoSchematicRecordings();
NSUXCam.startWithKey("<your-app-key>");
const blur = {
'type': 3,
'hideGestures': true,
'blurRadius': 20,
'screens': ['Home Screen']
}
var config = {
'userAppKey': '<your-app-key>',
'occlusions': [blur]
}
NSUXCam.startWithConfiguration(config);
```

@@ -46,36 +58,11 @@

## API
### Manual Screen Name Tagging
API | Description
----|----
startWithKey | Start session with app key
startNewSession | Start new session
stopSessionAndUploadData | Stop current session and upload data
urlForCurrentSession | Get URL for current session
urlForCurrentUser | Get URL for current user
occludeSensitiveScreen | Hide/unhide screen while sensitive view is present
occludeAllTextFields | Hide all text input fields
setUserIdentity | Set user identity
setUserProperty | Set property for current user
logEvent | Log event
logEventWithProperties | Log event with properties
pauseScreenRecording | Pause the screen recording
resumeScreenRecording | Resume the screen recording
optOutOverall | This will cancel any current session recording and opt this device out of future session recordings
optInOverall | Current session will be stopped and a new session will be started with the last settings
optIntoVideoRecording | This will opt this device into video recording for future sessions
optOutOfVideoRecording | This will opt this device out of video recording for future sessions
optInVideoRecordingStatus | Returns the opt-in video status of this device
optInOverallStatus | Returns the opt-in status of this device
cancelCurrentSession | Cancels the recording of the current session and discards the data
setMultiSessionRecord | Set whether to record multiple sessions or not
deletePendingUploads | Deletes any sessions that are awaiting upload
pendingSessionCount | Returns how many sessions are waiting to be uploaded
occludeSensitiveView | Hide a view that contains sensitive information or that you do not want recording
unOccludeSensitiveView | Unhides occluded view
occludeSensitiveViewWithoutGesture | Occludes sensitive view and disables gesture capture for that view
tagScreenName | Tag screen name. Useful for framework like flutter, react native and nativescript, where application is rendered in single controller or activity
setAutomaticScreenNameTagging | Enable / disable the automatic tagging of screen names
setPushNotificationToken | Set the token to be used to send push notifications to the app
reportBugEvent | Send a report of a problem your app encountered to be displayed in the dashboard
reportBugEventProperties | Send bug event with associated properties
```javascript
import { HostListener } from "@angular/core";
@HostListener('loaded')
pageOnInit() {
NSUXCam.tagScreenName("<screen-name>");
}
```

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc