The following API allows you to control when the session gets recorded.
Start the UXCam application to verify the API key with the server, get the settings configurations and start capturing the data according to the configuration.
UXCam.start(withKey appKey: String) //With completion handler UXCam.start(withKey appKey: String, completionBlock sessionStartedBlock: ((Bool) -> Void)? = nil)
+ (void) startWithKey:(NSString*)UXCamKey; //With completion handler + (void)startWithKey:(nonnull NSString *)userAPIKey completionBlock:(nullable void (^)(BOOL))sessionStartedBlock;
The API parameters are:
appKey: App-key (found on UXCam dashboard).
UXCam automatically starts/stops sessions depending on application state. If you want to take control, use this API to stop UXCam session and upload it.
UXCam.stopSessionAndUploadData() //With completion handler UXCam.stopSessionAndUploadData(_ block: (() -> Void)? = nil)
+ (void) stopSessionAndUploadData; //With completion handler + (void)stopSessionAndUploadData:(nullable void (^)(void))block;
Cancel the recording of the current session and discard the data.
Allow a Short Break for Another App
Prevent a short trip to another app from causing a break in a session. This is useful when your user needs to leave the app for a short amount of time like log-in using google or when you open URL link using an external browser among other use cases.
UXCam.allowShortBreak(forAnotherApp continueSession: Bool)
The API parameters are:
continueSession: Set to TRUE to continue the current session after a short trip out to another app. Default is FALSE - stops the session as soon as the app enters the background.
Note: Set to TRUE to continue the current session before a short trip out to another app, and set to FALSE after coming back to the app.
Add Verification Listener
Get verification status when UXCam starts capturing sessions. Its is particularly useful in cases such as,
- When you want to log certain events as soon as the session starts.
- When you want to log current UXCam session or user URL to other 3rd party services.
Doesn't exist on iOS - use startWithKey with completion handler.
Configure Multisession Recordings
Configure whether UXCam is set to automatically record a new session when the app resumes from the background.
Set whether to automatically record multiple sessions or not. Default is TRUE.
UXCam.setMultiSessionRecord(_ recordMultipleSessions: Bool)
+ (void) setMultiSessionRecord:(BOOL)recordMultipleSessions;
Get current multi session recording status (whether app is set to record multiple sessions or not).
Delete Pending Records
Delete sessions that are awaiting to upload.
UXCam.deletePendingUploads() //get pending uploads count UXCam.pendingUploads() -> UInt
+ (void) deletePendingUploads; //get pending uploads count + (NSUInteger) pendingUploads;
Upload Pending Session
Begin uploading pending sessions.