Trigger API: Autonomous Single App Mode (ASAM) Session

Added in version 9.1

This section of the API allows you to start and end an Autonomous Single App Mode (ASAM) session.  For more information on ASAM and Apple's requirements for its use, click  here

Functions

Callbacks

Related Settings

Requirements

  • iOS device is configured for Autonomous Single App Mode (specifically that it is supervised and enrolled in an MDM that is configured with the necessary ASAM profile - more on this here)
  • JavaScript API > Access JavaScript API
    • By Import - required as communication with the Remote Management Server requires an Internet connection, requires inclusion of kiosk_functions.js prior to any of the following calls.

Sample Code

This sample code relies on the JavaScript APIs built into Kiosk Pro and will not run successfully in other browsers or within our in-app help interface.  
To run sample code, set the app's homepage to   http://www.kioskproapp.com/asam

Download Sample Code


kp_AutonomousSingleAppModeAPI_startSession

This function starts a new Autonomous Single App Mode session.

Format kp_AutonomousSingleAppModeAPI_startSession(silently);
Parameters
  • silently = [required] boolean that defines whether to show a native alert confirming that the session was started or there was an error.

Status

Function will return the following callback with the status of the session request:


kp_AutonomousSingleAppModeAPI_endSession

This function closes an existing Autonomous Single App Mode session.

Format kp_AutonomousSingleAppModeAPI_endSession(silently);
Parameters
  • silently = [required] boolean, defines whether to show a native alert that the session was ended or there was an error.

Status

Function will return the following callback with the status of the session request:


kp_AutonomousSingleAppModeAPI_startRequestCallback

This callback is triggered following a request to start an ASAM session by the app or through kp_AutonomousSingleAppModeAPI_startSession.

Format
			kp_AutonomousSingleAppModeAPI_startRequestCallback(error);
		
Return values error = array containing all information returned by the iOS operating system about why the session was not successfully started, including code, userDescription, failureReason, recoverySuggestion, and debugDescription. If error is undefined, the session was started successfully.

kp_AutonomousSingleAppModeAPI_endRequestCallback

This callback is triggered following a request to end an ASAM session by the app or through kp_AutonomousSingleAppModeAPI_endSession.

Format
			kp_AutonomousSingleAppModeAPI_endRequestCallback(error);
		
Return values error = array containing all information returned by the iOS operating system about why the session was not successfully ended, including code, userDescription, failureReason, recoverySuggestion, and debugDescription. If error is undefined, the session was ended successfully.

Still stuck? How can we help? How can we help?