Access API: What's Included

In this article

This portion of our JavaScript API allows you to access information about the device - specifically, to check if the JavaScript API is available to be called, to control your content based on the device’s orientation, to access the location coordinates of your device, and to access the Unique ID set in Kiosk Pro settings.

Check if the JavaScript API is available to be called

The custom JavaScript functions Kiosk Pro uses in its JavaScript API must be loaded before they can be called by your code. If you are accessing the JavaScript API by import as recommended, all functions will be loaded into the page prior to the ‘onload’ event and will thereafter be available at any time.

If you choose to access the JavaScript API by injection, it may not be fully loaded when the ‘onload’ event is triggered and in this case we recommend using these functions to determine when it is safe for your code to call an API function.

View Documentation & Sample Code

Determine which version of Kiosk Pro is being used

These API calls allow you to check which version of Kiosk Pro you are currently running, including the app name (for example, Kiosk Pro Plus) and the version number (for example, 6.8.1). This information can be useful if you are deploying a new API call that may not be supported across all kiosks in your deployment or can be used for troubleshooting.

View Documentation & Sample Code

Access the Unique iPad ID and Group IDs set in Kiosk Pro settings

Kiosk Pro allows you to reference the Unique iPad ID set for your kiosk within Kiosk Pro settings by setting it as a JavaScript variable as the page is loading.

This lets you identify which kiosk is requesting a page or to tag form data with the ID of the sending kiosk. Checking for a unique ID can also provide a quick way of determining whether a visitor is accessing a site through Kiosk Pro (as opposed to a regular web browser).

To ensure that the ID variable is available when the ‘onload’ event is triggered, we recommend accessing the API by import. If you must access the API by injection, you will need to use the Availability API to determine when the function can safely be called.

View Documentation & Sample Code

Control your content based on the device’s orientation

This callback uses information sent from the device’s accelerometer to inform your code of the current orientation of the device. This is triggered automatically by the app on page load and after any change in the device’s orientation.

View Documentation & Sample Code

Check the status of Guided Access or Single App Mode

Added in version 9.3

You can check if Guided Access or Single App Mode are enabled.

View Documentation & Sample Code

Determine if device is currently using VoiceOver accessibility

Added in version 9.0.5

VoiceOver is a native iOS gesture-based screen reader that lets visitors engage with your content even if they can't see the screen. When enabled, VoiceOver provides an audio description of everything happening on the screen, allowing visitors with visual impairments to navigate and engage with content.

VoiceOver is an iOS system level setting and cannot currently be enabled and/or disabled programmatically by the app.

We recommend setting up the iPad in Single App Mode with VoiceOver configured as the only Accessibility Shortcut (under iOS Settings > General > Accessibility > Accessibility Shortcut > VoiceOver only). This allows visitors to enable and disable VoiceOver by triple-clicking the Home button without any other on-screen input required.

Screen interactions are significantly different when VoiceOver is enabled so we've added this API to allow you to determine whether the device is currently using VoiceOver and to notify you when that status changes, allowing you to provide additional instructions on how to use the device in VoiceOver mode or how to disable VoiceOver, or to switch over to different content.

If using VoiceOver, you may want to delay the idle timeout period using our Idle Timer API (as touch events are not passed back to the app by the iOS operating system when VoiceOver is enabled and so the idle timer can execute even if a visitor is interacting with the screen).

View Documentation & Sample Code

Check current battery status and level

Added in version 9.2

This set of API calls allows you to check the current status of the battery and returns callbacks when charging status or battery levels change.

View Documentation & Sample Code

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