Skip to content

You are here: Operating System API

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 voltmx.os Namespace and related functions and constants.

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