The Motion-S Mobile SDK is a set of libraries for Android, iOS and the IONIC/Cordova framework, which can be used natively on Android/iOS or with cross-platform frameworks. The mobile SDK collects trip data and uploads it automatically to the Motion-S platform with the following structure:

  "startTimestamp": 1512454642000,
  "endTimestamp": 1512554642000,
  "device": "device-id",
  "origin": "<customer-name>-<fleet-name>-<fleet-number>",
      "id_loc": 1,

This information can also be uploaded to a custom endpoint defined by the customer. In this case, then the trip data has to be sent to the Motion-S platform through the API in the same format as received by the SDK.


SDK integration

The Motion-S Mobile SDK can be integrated with other applications depending on the customer needs. With this in mind, in this section we describe the usage of this library and the possible events from JavaScript/IONIC/Cordova.

Supported Versions

  • Android: 28+
  • iOS: 13.x


The Motion-S Interface currently describes three actions:

//Initializes the SDK (if not already done) and enables trip recording
//Pauses (but does not unload) the SDK
//Forces trip uploading (if not already in progress; normally this is happening periodically)


You can subscribe to events using the ionic broadcaster plug-in:

this.broadcaster.addEventListener( 'com.motions.sdk.client.STATE_CHANGED_BROADCAST_SDK').subscribe(x =>
  # x is a json
  x.EXTRA_DEVICEID The device id used in api calls [String]
  x.EXTRA_SDKSTATE The SDK state [0|1|2] (stopped, listening, heartbeat)

this.broadcaster.addEventListener( 'com.motions.sdk.client.STATE_CHANGED_BROADCAST_RECORDER').subscribe(x =>
   # x is a json
   x.EXTRA_RECORDERSTATE The trip recorder state [0|1|2] (idle,recording, error)

this.broadcaster.addEventListener( 'com.motions.sdk.client.STATE_CHANGED_BROADCAST_UPLOADER').subscribe(x =>
   # x is a json
   x.EXTRA_UPLOADERSTATE The uploader state [1|2|3] (working, success, error)