Access API: App Version

Functions

This JavaScript API allows you to check which version of Kiosk Pro you are currently running.

Requirements

  • Access JavaScript API
    • 'By Import' - recommended, works both online & offline, requires inclusion of kiosk_functions.js prior to any of the following calls.
    • 'By Injection' - only works offline, may not be available 'onload' event.

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/app-version

Download Sample Code


kp_VersionAPI_requestFullVersion

This function triggers a callback containing the full version number of the Kiosk Pro app currently running on the device. The full version number is made up of the main version number and build number. For example, "1.2.3456" (1.2 = main, .3456 = build).

Format
kp_VersionAPI_requestFullVersion(callback);
		
Parameters callback = callback name as string
Callback format
callback(fullVersion);
		
Callback return values fullVersion = a string containing the full version number.

Example

This example requests the full version number using the 'onload' event, requiring that you access the JavaScript API 'By Import' and include 'kiosk_functions.js' prior to these calls. It then uses the callback defined in the 'kp_VersionAPI_requestFullVersion' call to trigger an alert containing the version number.

window.addEventListener('load', function() {
	kp_VersionAPI_requestFullVersion('kp_VersionAPI_requestFullVersion_callback');
}, false);

function kp_VersionAPI_requestFullVersion_callback(fullVersion) {
	alert("Version number is "+fullVersion);
}

Run Example


kp_VersionAPI_requestMainVersion

This function triggers a callback containing the main version number of the Kiosk Pro app currently running on the device. For example, "1.2".

Format
kp_VersionAPI_requestMainVersion(callback);
		
Parameters callback = callback name as string
Callback format
callback(mainVersion);
		
Callback return values mainVersion = a string containing the main version number.

kp_VersionAPI_requestBuildNumber

This function triggers a callback containing the build number of the Kiosk Pro app currently running on the device. For example, "3456".

Format
kp_VersionAPI_requestBuildNumber(callback);
		
Parameters callback = callback name as string
Callback format
callback(buildNumber);
		
Callback return values buildNumber = a string containing the build number.

kp_VersionAPI_requestProductName

This function triggers a callback containing the version name of the Kiosk Pro app currently running on the device. For example, "Kiosk Pro Plus".

Format
kp_VersionAPI_requestProductName(callback);
		
Parameters callback = callback name as string
Callback format
callback(productName);
		
Callback return values productName = a string containing the version name.

kp_VersionAPI_requestProductNameWithFullVersion

This function triggers a callback containing the full version & name of the Kiosk Pro app currently running on the device. For example, "Kiosk Pro Plus (1.2.3456)".

Format
kp_VersionAPI_requestProductNameWithFullVersion(callback);
		
Parameters callback = callback name as string
Callback format
callback(productNameWithFullVersion);
		
Callback return values productNameWithFullVersion = a string containing the full version & name.

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