Methods reference

The Cordova plugin has wrapper methods for some commonly used methods in the native SDKs. Like other Cordova plugins, methods do not return anything, and use callback functions to return method results.

Example

var hypertrack = cordova.plugins.HyperTrack;

// Method to start trip
hypertrack.startTrip(
    "DRIVER_ID", ["TASK_ID_1", "TASK_ID_2"],

    // Success callback
    function(text) {
        // Handle success
    },

    // Error callback
    function(error) {
        // Handle error
    }
);

List of methods

Method name Arguments Description
connectDriver driverID: String, success: Callback, error: Callback Connect the SDK to the REST APIs for the given driver
startTrip driverID: String, taskIDs: String[], success: Callback, error: Callback Start a trip for the given driver
endTrip tripID: String, success: Callback, error: Callback End the given trip
completeTask taskID: String, success: Callback, error: Callback Complete the given task
startShift driverID: String, success: Callback, error: Callback Start a shift for the given driver
endShift success: Callback, error: Callback End the current active shift, if any
isTransmitting callback: Callback Sends true to callback if SDK is currently active and transmitting, false otherwise
getActiveDriver callback: Callback Sends id of the active driver to the callback
getPublishableKey callback: Callback Sends the publishable API that was set through preferences

Was this helpful? Yes, thanks! Not really

results matching ""

    No results matching ""