Warning Older Docs! - You are viewing documentation for a previous released version of RhoMobile Suite.

RhoMobile API Summary

Below is a list of the new common api’s for RhoMobile Suite 4.1. Please consult the 2.x migration guide if you are moving a 2.x application to 4.1. If you are starting a new project, it is advised to the use 4.x API’s going forward, however the 2.x APIs are still currently supported.

4.1 API’s

: Indicates this API/Platform is supported and does not require a license.

: Indicates this API/Platform requires a license for production use.

: Indicates this API is only available on Symbol devices.

LANGUAGES PLATFORMS
Class
Application
Barcode
Battery
CardReader
Database
Geolocation
Intent
KeyCapture
KeyState
Log
Mediaplayer
NativeMenubar
NativeTabbar
NativeToolbar
Navbar
Network
NFC - Adapter (BETA)
NFC - Message (BETA)
NFC - Record (BETA)
NFC - Tag (BETA)
Notification
ORM & ORMModel
Printer
Printer Zebra
Push
RhoConnectClient
RhoFile
ScreenOrientation
Sensor
Signature Capture
SignalIndicators
System
Webview

Licensing

The items listed above that are indicated with a require a license. Please review the Licensing Guide for more details regarding licensing.

Using 2.2 API’s in a 4.0 Application

Some API classes that may have been available in RhoMobile Suite 2.2 and have not yet have been incorporated in the new Common API class set for RhoMobile Suite 4.0. However these APIs are still available in the 2.2 format. The following API classes will soon be incorporated in future versions of RhoMobile Suite 4.x in order to supply both a Common API format in both JavaScript and Ruby.

When using 2.2 API’s in RhoMobile 4.0, the 2.2 API compatibility matrix still applies.

RhoElements 2.2 APIs

The 2.2 RhoElement APIS are only supported on Zebra Webkit. This webkit is still available on Windows Mobile/CE and Android platforms, however on Android the default webkit that is used is the stock Android Webkit.

Rhodes 2.2 APIs

2.2 Rhodes APIs that were not replaced by an equivalent RhoMobile 4.0 API (ex: Camera) are supported on all platforms that were supported previously. Ruby API’s will behave exactly as they did before. Note that some of the Rhodes 2.2 API’s provided JavaScript support but used a different version of the RhoMobile JavaScript API library: rho_javascript_api.js

To generate this file you must enable JavaScript by putting rho-javascript into extensions in your build.yml.

extensions: ["rho-javascript"]

JavaScript APIs

To use the JavaScript APIs in RE 2.2, add the public/js/rho_javascript_api.js file – created at build time as part of the application package – to the .html, .erb, or .js file calling the JavaScript method. This file can coexist with RhoMobile 4.0 JavaScript API file: rhoapi-modules.js however it has been altered from the version that was built using 2.2. You must re-generate the rho_javascript_api.js file to properly coexist.

JavaScript ORM

If you are going to be using the JS ORM API, you’ll also need to include this line in any files that will be using it:

<script type="text/javascript" charset="utf-8" src="/public/api/rhoapi-modules-ORM.js"></script>
Back to Top