API: Start & End ASAM Session
This section of the API allows you to start and end an Autonomous Single App Mode (ASAM) session. More information on ASAM and Apple's requirements for its use are available here.
Requirements
- Integration of our JavaScript API into your webpage
- Sample code to run within the app and download for integration into your own project is available here.
- Best practices for working with the JavaScript API are available here.
- App Settings
- Content > JavaScript API > Access JavaScript API = By Import
- iOS/iPadOS Permissions
- Bluetooth - more on enabling specific iOS/iPadOS permissions here.
- Physical Hardware
- An iOS/iPadOS device configured for Autonomous Single App Mode (specifically that it is supervised and enrolled in an MDM that is configured with the necessary ASAM profile)
Triggers via API Functions
Start ASAM Session
This function starts a new Autonomous Single App Mode session.
Format | kp_AutonomousSingleAppModeAPI_startSession(silently); |
Parameters | silently = [boolean] defines whether to show a native alert confirming that the session was started or there was an error. |
Triggers | This call immediately triggers kp_AutonomousSingleAppModeAPI_startRequestCallback with the status of the session request. |
End ASAM Session
This function ends an existing Autonomous Single App Mode session.
Format | kp_AutonomousSingleAppModeAPI_endSession(silently); |
Parameters | silently = [boolean] defines whether to show a native alert confirming that the session was started or there was an error. |
Triggers | This call immediately triggers kp_AutonomousSingleAppModeAPI_endRequestCallback with the status of the session request. |
Notifications via API Callbacks
When a Session Starts
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 |
|
When a Session Ends
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 |
|
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 https://kioskgroup.com/asam-api
- To download a .zip of sample code, click here.
Change Log
- Added in version 9.1