Operating System API

The Operating System API enables you to access various features provided by the operating system of the device. The Operating System API uses the kony.os namespace and related functions and constants.

Function Description
kony.os.addHiddenField This API helps the developers to pass dynamic values when the form needs to be submitted to external sites.
kony.os.addMetaTag This API adds a meta tag in html header. This API result will effect only on header reload.
kony.os.createUUID This API returns a string that contains a formatted UUID value.
kony.os.detectDynamicInstrumentation This API helps your application to detect the presence of any Dynamic Instrumentation instance.
kony.os.deviceInfo This API allows the developers to get information about the device in which the application is launched.
kony.os.endSecureTransaction This API can be invoked on an event of a widget.
kony.os.freeMemory This API provides the ability to query and fetch the system-wide memory available on the mobile device for allocation.
kony.os.getAppContext This API allows the developers to get information about the mode in which the application is launched.
kony.os.getBatteryLevel Retrieves the current percentage charge level of the device battery, as an integer value.
kony.os.getBatteryState Retrieves the current state of the battery.
kony.os.getDeviceId This API returns the unique ID of a device.
kony.os.getDeviceCurrentOrientation This API returns the current orientation of the device.
kony.os.hasAccelerometerSupport This API returns whether accelerometer is supported on a device.
kony.os.hasCameraSupport This API returns whether Camera is supported on a device.
kony.os.hasGPSSupport This API returns whether GPS is supported on a device.
kony.os.hasOrientationSupport This API returns whether Orientation is supported on a device.
kony.os.hasTouchSupport This API returns whether Touch is supported on a device.
kony.os.print When invoked without any parameter, this API prints the entire form that is currently in view.
kony.os.readHiddenField This API allows the developers to read the hidden fields added by the os.addHiddenField API.
kony.os.registerBatteryService Registers for the battery monitoring service of the device operating system.
kony.os.registerSpeechRecognizer Registers callbacks for speech recognition events.
kony.os.removeAllMetaTags This API removes all the user defined meta tags from a html header.
kony.os.removeMetaTag This API removes a specific meta tag from a html header.
kony.os.startSecureTransaction This API can be invoked on an event of a widget. When this API is invoked it makes all the data and subsequent transactions of the application secure.
kony.os.startSpeechRecognition Starts the speech recognition process.
kony.os.stopSpeechRecognition Stops existing (already started with kony.os.startSpeechRecognition API) speech recognition operations.
kony.os.toCurrency This API allows you to convert the given number to represent currency. At present, only USA currency is supported.
kony.os.toNumber This API converts the argument to a number.
kony.os.unregisterBatteryService This API stops the monitoring process of the device battery.
kony.os.unregisterSpeechRecognizer Deregisters existing (already registered with kony.os.registerSpeechRecognizer API) callbacks for speech recognition events.
kony.os.userAgent This API returns a unique identifier of the mobile device that is extracted from the user agent.
 

To view the functionality of the Operating System API in action, download the sample application from the link below. Once the application is downloaded, build and preview the application using the Quantum App.