react-native-ux-cam 5.4.15 → 6.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/UXCam.js DELETED
@@ -1,570 +0,0 @@
1
- 'use strict';
2
- var { Platform, NativeModules, findNodeHandle, NativeEventEmitter } = require('react-native');
3
- var UXCamBridge = NativeModules.RNUxcam;
4
-
5
- // Capture the platform we are running on
6
- const platform = Platform.OS;
7
- const platformIOS = platform === "ios" ? true : false;
8
- const platformAndroid = platform === "android" ? true : false;
9
-
10
- class UXCam {
11
- /**
12
- * This will start the UXCam system, get the settings configurations from our server and start capturing the data according to the configuration.
13
- *
14
- * @brief Start the UXCam session
15
- * @parameter configuration The configuration to identify your UXCam app - find appKey in the UXCam dashboard for your account
16
- */
17
- static startWithConfiguration(configuration) {
18
- UXCamBridge.startWithConfiguration(configuration);
19
- }
20
-
21
- static async configurationForUXCam() {
22
- return UXCamBridge.configurationForUXCam();
23
- }
24
-
25
- static updateConfiguration(configuration) {
26
- UXCamBridge.updateConfiguration(configuration);
27
- }
28
-
29
- static applyOcclusion(occlusion) {
30
- UXCamBridge.applyOcclusion(occlusion);
31
- }
32
-
33
- static removeOcclusion(occlusion) {
34
- UXCamBridge.removeOcclusion(occlusion);
35
- }
36
-
37
- /**
38
- * @deprecated Use {@link #startWithConfiguration(configuration)} instead to start new session
39
- *
40
- * @brief Start the UXCam session
41
- * @parameter userAppKey The key to identify your UXCam app - find it in the UXCam dashboard for your account
42
- */
43
- static startWithKey(appKey) {
44
- UXCamBridge.startWithKey(appKey);
45
- }
46
-
47
- /**
48
- * Starts a new session after the {@link #stopSessionAndUploadData()} method has been called.
49
- * This happens automatically when the app returns from background.
50
- */
51
- static startNewSession() {
52
- UXCamBridge.startNewSession();
53
- }
54
-
55
- /**
56
- * Stop current uxcam session and send captured data to server.<br>
57
- * Use this to start sending the data on UXCam server without the app going into the background.<br>
58
- * This starts an asynchronous process and returns immediately.
59
- */
60
- static stopSessionAndUploadData() {
61
- UXCamBridge.stopSessionAndUploadData();
62
- }
63
-
64
- /**
65
- * Returns a URL path that shows the current session when it compeletes
66
- *
67
- * @note This can be used for tying in the current session with other analytics systems
68
- *
69
- * @return url path for current session or nil if no verified session is active
70
- */
71
- static async urlForCurrentSession() {
72
- return UXCamBridge.urlForCurrentSession();
73
- }
74
-
75
- /**
76
- * Returns a URL path for showing all the current users sessions
77
- *
78
- * @note This can be used for tying in the current user with other analytics systems
79
- *
80
- * @return url path for user session or nil if no verified session is active
81
- */
82
- static async urlForCurrentUser() {
83
- return UXCamBridge.urlForCurrentUser();
84
- }
85
-
86
- /**
87
- Hide / un-hide the whole screen from the recording
88
-
89
- 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
90
- Once turned on with a `true` parameter it will continue to hide the screen until called with `false`
91
-
92
- @parameter hideScreen Set `true` to hide the screen from the recording, `false` to start recording the screen contents again
93
- @parameter hideGesture Set `true` to hide the gestures in the screen from the recording, `false` to start recording the gestures in the screen again
94
- */
95
- static occludeSensitiveScreen(hideScreen, hideGesture) {
96
- if(typeof hideGesture !== "undefined"){
97
- UXCamBridge.occludeSensitiveScreen(hideScreen, hideGesture);
98
- }else{
99
- UXCamBridge.occludeSensitiveScreen(hideScreen, true);
100
- }
101
- }
102
-
103
- /**
104
- * @deprecated Use {@link #occludeAllTextFields(occludeAll)} instead to start new session
105
- Hide / un-hide all UITextField views on the screen
106
-
107
- Call this when you want to hide the contents of all UITextFields from the screen capture. Default is `false`.
108
-
109
- @parameter occludeAll Set `true` to hide all UITextField views on the screen in the recording, `false` to stop occluding them from the screen recording.
110
- */
111
- static occludeAllTextView() {
112
- UXCamBridge.occludeAllTextFields(true);
113
- }
114
-
115
- /**
116
- Hide / un-hide all UITextField views on the screen
117
-
118
- Call this when you want to hide the contents of all UITextFields from the screen capture. Default is `false`.
119
-
120
- @parameter occludeAll Set `true` to hide all UITextField views on the screen in the recording, `false` to stop occluding them from the screen recording.
121
- */
122
- static occludeAllTextFields(occludeAll) {
123
- UXCamBridge.occludeAllTextFields(occludeAll);
124
- }
125
-
126
- /**
127
- UXCam uses a unique number to tag a device.
128
- 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.
129
-
130
- @parameters userIdentity String to apply to this user (device) in this recording session
131
- */
132
- static setUserIdentity(userIdentity) {
133
- UXCamBridge.setUserIdentity(userIdentity);
134
- }
135
-
136
- /**
137
- Add a key/value property for this user
138
-
139
- @parameter propertyName Name of the property to attach to the user
140
- @parameter value A value to associate with this property
141
-
142
- @note Only number and string value types are supported to a maximum size per entry of 1KiB
143
- */
144
- static setUserProperty(propertyName, value) {
145
- UXCamBridge.setUserProperty(propertyName, value);
146
- }
147
-
148
- /**
149
- Add a single key/value property to this session
150
-
151
- @parameter propertyName Name of the property to attach to the session recording
152
- @parameter value A value to associate with this property
153
-
154
- @note Only number and string value types are supported to a maximum size per entry of 1KiB
155
- */
156
- static setSessionProperty(propertyName, value) {
157
- UXCamBridge.setSessionProperty(propertyName, value);
158
- }
159
-
160
- /**
161
- Insert a general event, with associated properties, into the timeline - stores the event with the timestamp when it was added.
162
-
163
- @parameter eventName Name of the event to attach to the session recording at the current time
164
- @parameter properties An Object of properties to associate with this event
165
-
166
- @note Only number and string property types are supported to a maximum count of 100 and maximum size per entry of 1KiB
167
- */
168
- static logEvent(eventName, properties) {
169
- if(typeof properties !== "undefined" || properties !== null){
170
- UXCamBridge.logEvent(eventName, properties);
171
- }else{
172
- UXCamBridge.logEvent(eventName);
173
- }
174
- }
175
-
176
- /**
177
- UXCam verification listener that returns success/failure status. TRUE status means the session was successfully verified and started.
178
- @parameter status Function to call that will receive verification status boolean value.
179
- */
180
- static addVerificationListener(status) {
181
- const emitter = new NativeEventEmitter(UXCamBridge);
182
- return emitter.addListener('UXCam_Verification_Event', status)
183
- }
184
-
185
- /**
186
- * @brief Call this before calling startWithKey to disable UXCam from capturing sessions that crash
187
- *
188
- * @param disable `true` to disable crash capture
189
- * @note By default crash handling is enabled.
190
- */
191
- static disableCrashHandling(disable)
192
- {
193
- UXCamBridge.disableCrashHandling(disable);
194
-
195
- }
196
-
197
- /**
198
- * Returns the current recording status
199
- *
200
- * @return `true` if the session is being recorded
201
- */
202
- static isRecording() {
203
- return UXCamBridge.isRecording();
204
- }
205
-
206
- /**
207
- * Pause the screen recording
208
- */
209
- static pauseScreenRecording() {
210
- UXCamBridge.pauseScreenRecording();
211
- }
212
-
213
- /**
214
- * Resumes a paused session - will cancel any remaining pause time and resume screen recording
215
- */
216
- static resumeScreenRecording() {
217
- UXCamBridge.resumeScreenRecording();
218
- }
219
-
220
- /**
221
- * This will cancel any current session recording and opt this device out of future session recordings until `optInOverall` is called
222
- * @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
223
- */
224
- static optOutOverall(){
225
- UXCamBridge.optOutOverall();
226
- }
227
-
228
- /**
229
- * This will opt this device out of schematic recordings for future sessions
230
- * - any current session will be stopped and restarted with the last settings passed to `startWithKey`
231
- */
232
- static optOutOfSchematicRecordings()
233
- {
234
- if (platformIOS)
235
- {
236
- UXCamBridge.optOutOfSchematicRecordings();
237
- }
238
- }
239
-
240
- /**
241
- * This will opt this device into session recordings
242
- * - any current session will be stopped and a new session will be started with the last settings passed to `startWithKey`
243
- */
244
- static optInOverall()
245
- {
246
- UXCamBridge.optInOverall();
247
- }
248
-
249
- /**
250
- * This will opt this device back into session recordings
251
- */
252
- static optIntoSchematicRecordings()
253
- {
254
- if (platformIOS)
255
- {
256
- UXCamBridge.optIntoSchematicRecordings();
257
- }
258
- }
259
-
260
- /**
261
- * Returns the opt-in status of this device
262
- * @return `true` if the device is opted in to session recordings, `false` otherwise. The default is `false`.
263
- */
264
- static optInOverallStatus()
265
- {
266
- return UXCamBridge.optInOverallStatus();
267
- }
268
-
269
- /** Returns the opt-in status of this device for schematic recordings
270
- * @returns `true` if the device is opted in to schematic recordings, `false` otherwise. The default is `false`.
271
- * @note Use in conjunction with optInOverallStatus to control the overall recording status for the device
272
- */
273
- static optInSchematicRecordingStatus()
274
- {
275
- if (platformIOS)
276
- {
277
- return UXCamBridge.optInSchematicRecordingStatus();
278
- }
279
- else
280
- {
281
- // Just return the general status for Android which doesn't currently split status between session data and video
282
- return UXCamBridge.optInOverallStatus();
283
- }
284
- }
285
-
286
- /**
287
- * @Deprecated use optOutOverall() instead
288
- * This will cancel any current session recording and opt this device out of future session recordings until `optIn` is called
289
- * @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
290
- */
291
- static optOut() {
292
- UXCamBridge.optOutOverall();
293
- }
294
-
295
- /**
296
- * @Deprecated use optInOverall() instead
297
- */
298
- static optIn() {
299
- UXCamBridge.optInOverall();
300
- }
301
-
302
- /**
303
- * @Deprecated use optInOverallStatus() instead
304
- */
305
- static optStatus() {
306
- return UXCamBridge.optInOverallStatus()
307
- }
308
-
309
- /**
310
- * @brief Android only.
311
- * This will opt this device into video recording for future sessions.
312
- */
313
- static optIntoVideoRecording() {
314
- if (platformAndroid) {
315
- UXCamBridge.optIntoVideoRecording();
316
- }else if(platformIOS){
317
- UXCamBridge.optIntoSchematicRecordings();
318
- }
319
- }
320
-
321
- /**
322
- * @brief Android only.
323
- * This will opt this device out of video recording for future sessions.
324
- */
325
- static optOutOfVideoRecording() {
326
- if (platformAndroid) {
327
- UXCamBridge.optOutOfVideoRecording();
328
- }else if(platformIOS){
329
- UXCamBridge.optOutOfSchematicRecordings();
330
- }
331
- }
332
-
333
- /**
334
- * @brief Android only.
335
- * Returns the opt-in video status of this device
336
- * @return `true` if the device is opted in for video recordings, `false` otherwise.
337
- */
338
- static optInVideoRecordingStatus(){
339
- if (platformAndroid) {
340
- return UXCamBridge.optInVideoRecordingStatus();
341
- }else if(platformIOS){
342
- return UXCamBridge.optInSchematicRecordingStatus();
343
- }
344
- return false;
345
- }
346
-
347
- /**
348
- * Cancels the recording of the current session and discards the data
349
- *
350
- * @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`
351
- */
352
- static cancelCurrentSession() {
353
- UXCamBridge.cancelCurrentSession();
354
- }
355
-
356
- /**
357
- * 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.
358
- * 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.
359
- *
360
- * @brief Prevent a short trip to another app causing a break in a session
361
- * @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.
362
- * @param continueSession For android, you can also add time to wait in `milliseconds` before finishing the session.
363
- */
364
- static allowShortBreakForAnotherApp(continueSession) {
365
- if (typeof continueSession === 'boolean') {
366
- UXCamBridge.allowShortBreakForAnotherApp(continueSession);
367
- } else if (typeof continueSession === 'number') {
368
- UXCamBridge.allowShortBreakForAnotherAppInMillis(continueSession);
369
- } else {
370
- UXCamBridge.allowShortBreakForAnotherApp(true);
371
- }
372
- }
373
-
374
- /**
375
- * @brief Resume after short break. Only used in android, does nothing on iOS
376
- */
377
- static resumeShortBreakForAnotherApp() {
378
- UXCamBridge.allowShortBreakForAnotherApp(false);
379
- }
380
-
381
- /**
382
- * Get whether UXCam is set to automatically record a new session when the app resumes from the background
383
- */
384
- static getMultiSessionRecord() {
385
- return UXCamBridge.getMultiSessionRecord();
386
- }
387
-
388
- /**
389
- * Set whether to record multiple sessions or not
390
- *
391
- * @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).
392
- * @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)
393
- */
394
- static setMultiSessionRecord(multiSessionRecord) {
395
- UXCamBridge.setMultiSessionRecord(multiSessionRecord);
396
- }
397
-
398
- /**
399
- * @brief Deletes any sessions that are awaiting upload
400
- * @note Advanced use only. This is not needed for most developers. This can't be called until UXCam startWithKey: has completed
401
- */
402
- static deletePendingUploads() {
403
- UXCamBridge.deletePendingUploads();
404
- }
405
-
406
- /**
407
- * @brief Returns how many sessions are waiting to be uploaded
408
- *
409
- * 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.
410
- */
411
- static pendingSessionCount() {
412
- return UXCamBridge.pendingSessionCount();
413
- }
414
-
415
- /**
416
- * @brief IOS only. Uploads sessions that were pending to be uploaded
417
- *
418
- * 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.
419
- */
420
- static uploadPendingSession() {
421
- return UXCamBridge.uploadPendingSession();
422
- }
423
-
424
- /**
425
- * Hide a view that contains sensitive information or that you do not want recording on the screen video.
426
- *
427
- * @parameter sensitiveView The view to occlude in the screen recording
428
- */
429
- static occludeSensitiveView(sensitiveView){
430
- if (sensitiveView){
431
- UXCamBridge.occludeSensitiveView(findNodeHandle(sensitiveView));
432
- }
433
- }
434
-
435
- /**
436
- * Stop hiding a view that was previously hidden
437
- * If the view passed in was not previously occluded then no action is taken and this method will just return
438
- *
439
- * @parameter view The view to show again in the screen recording
440
- */
441
- static unOccludeSensitiveView(view){
442
- if (view){
443
- UXCamBridge.unOccludeSensitiveView(findNodeHandle(view));
444
- }
445
- }
446
-
447
- /**
448
- * Hide a view that contains sensitive information or that you do not want recording on the screen video.
449
- *
450
- * @parameter sensitiveView The view to occlude in the screen recording
451
- */
452
- static occludeSensitiveViewWithoutGesture(sensitiveView){
453
- if (sensitiveView){
454
- UXCamBridge.occludeSensitiveViewWithoutGesture(findNodeHandle(sensitiveView));
455
- }
456
- }
457
-
458
- /**
459
- UXCam normally captures the view controller name automatically but in cases where it this is not sufficient (such as in OpenGL applications)
460
- or where you would like to set a different unique name, use this function to set the name.
461
-
462
- @note Call this in `[UIViewController viewDidAppear:]` after the call to `[super ...]` or automatic screen name tagging will override your value
463
-
464
- @parameter screenName Name to apply to the current screen in the session video
465
- */
466
- static tagScreenName(screenName) {
467
- UXCamBridge.tagScreenName(screenName);
468
- }
469
-
470
- /**
471
- Enable / disable the automatic tagging of screen names
472
-
473
- @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.
474
-
475
- @parameters autoScreenTagging Set to `true` to enable automatic screen name tagging (the default) or `false` to disable it
476
- */
477
- static setAutomaticScreenNameTagging(autoScreenTagging) {
478
- UXCamBridge.setAutomaticScreenNameTagging(autoScreenTagging);
479
- }
480
-
481
- /**
482
- Add a name to the list of screens names that wont be added to the timeline in automatic screen name tagging mode
483
-
484
- 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.
485
- 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.
486
-
487
- @param screenName A name to add to the list of screens to ignore
488
-
489
- @note This is a convenience method for `addScreenNamesToIgnore([nameToIgnore])`
490
- */
491
- static addScreenNameToIgnore(screenName){
492
- UXCamBridge.addScreenNameToIgnore(screenName);
493
- }
494
-
495
- /**
496
- Add a list of names to the list of screens names that wont be added to the timeline in automatic screen name tagging mode
497
-
498
- 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.
499
- 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.
500
-
501
- @param screenNames A list of screen names to add to the ignore list
502
- */
503
- static addScreenNamesToIgnore(screenNames){
504
- UXCamBridge.addScreenNamesToIgnore(screenNames);
505
- }
506
-
507
- /**
508
- Remove the a name from the list of screens to be ignored in automatic screen name tagging mode
509
-
510
- @param screenName The name to remove from the list of ignored screens
511
- @note This is a convenience method for `removeScreenNamesToIgnore([nameToRemove])`
512
- */
513
- static removeScreenNameToIgnore(screenName){
514
- UXCamBridge.removeScreenNameToIgnore(screenName);
515
- }
516
-
517
- /**
518
- Remove the a list of names from the list of screens to be ignored in automatic screen name tagging mode
519
-
520
- @param screenNames A list of names to remove from the ignore list
521
- */
522
- static removeScreenNamesToIgnore(screenNames){
523
- UXCamBridge.removeScreenNamesToIgnore(screenNames);
524
- }
525
-
526
- // Remove all entries from the list of screen names to be ignored in automatic screen name tagging mode
527
- static removeAllScreenNamesToIgnore(){
528
- UXCamBridge.removeAllScreenNamesToIgnore();
529
- }
530
-
531
- // Get the list of screen names that are being ignored in automatic screen name tagging mode
532
- static screenNamesBeingIgnored(){
533
- return UXCamBridge.screenNamesBeingIgnored();
534
- }
535
-
536
- /**
537
- Set the token to be used to send push notifications to the app
538
- @param token Push notification token
539
- */
540
- static setPushNotificationToken(token){
541
- UXCamBridge.setPushNotificationToken(token);
542
- }
543
-
544
- /**
545
- Send a report of a problem your app encountered to be displayed in the dashboard
546
- @param eventName Name of the problem event
547
- @param properties Properties object associated with the event
548
- @note Only number and string property types are supported to a maximum count of 100 and maximum size per entry of 1KiB
549
- */
550
- static reportBugEvent(eventName, properties){
551
- if(typeof properties !== "undefined" || properties !== null){
552
- UXCamBridge.reportBugEvent(eventName, properties);
553
- }else{
554
- UXCamBridge.reportBugEvent(eventName);
555
- }
556
- }
557
-
558
- /**
559
- Enable/Disable advanced gesture recognition like swipe and pinch gestures.
560
- @param enable Set `true` to enable or `false` to disable before `startWithKey`. Default is `true`.
561
- @note Disable this on iOS if you are having problems with swipes or other gestures being interrupted while recording sessions.
562
- */
563
- static enableAdvancedGestureRecognizers(enable){
564
- if (platformIOS){
565
- UXCamBridge.enableAdvancedGestureRecognizers(enable);
566
- }
567
- }
568
- }
569
-
570
- module.exports = UXCam;
@@ -1,36 +0,0 @@
1
- export enum UXCamOcclusionType {
2
- OccludeAllTextFields = 1,
3
- Overlay = 2,
4
- Blur = 3
5
- }
6
-
7
- export default interface UXCamOcclusion {
8
- readonly type: UXCamOcclusionType;
9
- }
10
-
11
- export class UXBlur implements UXCamOcclusion {
12
- readonly type: UXCamOcclusionType;
13
- constructor() {
14
- this.type = UXCamOcclusionType.Blur;
15
- }
16
-
17
- blurRadius?: number;
18
- hideGestures?: boolean;
19
- }
20
-
21
- export class UXOverlay implements UXCamOcclusion {
22
- readonly type: UXCamOcclusionType;
23
- constructor() {
24
- this.type = UXCamOcclusionType.Overlay;
25
- }
26
-
27
- color?: number;
28
- hideGestures?: boolean;
29
- }
30
-
31
- export class UXOcclueAllTextFields implements UXCamOcclusion {
32
- readonly type: UXCamOcclusionType;
33
- constructor() {
34
- this.type = UXCamOcclusionType.OccludeAllTextFields;
35
- }
36
- }
@@ -1,6 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <classpath>
3
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8/"/>
4
- <classpathentry kind="con" path="org.eclipse.buildship.core.gradleclasspathcontainer"/>
5
- <classpathentry kind="output" path="bin"/>
6
- </classpath>