Get accurate live location and related data of vehicles, assets & people with help of connected devices/sensors/mobiles to provide location awareness to users of your app.
Below mentioned methods provide real-time visibility of your tracked objects, giving not just location information, but multiple additional fields which add value to your application.
InTouch.getDevices(<includeInActive>,<ignoreBeacon>,<lastUpdateTime>, new IDeviceListener() {
@Override
public void onSuccess(DevicesResponse devicesResponse) {
// write your code here.
}
@Override
public void onError(String reason, String identifier, String description) {
// reason gives the error type.
// errorIdentifier gives information about error code.
// errorDescription gives a message for a particular error.
}
});
InTouch.getDevices(<includeInActive>,<ignoreBeacon>,<lastUpdateTime>, object : IDeviceListener {
override fun onSuccess(t: DevicesResponse?) {
// write your code here.
}
override fun onError(reason: String?, errorIdentifier: String?, errorDescription: String?) {
// reason gives the error type.
// errorIdentifier gives information about error code.
// errorDescription gives a message for a particular error.
}
})
b) Get the list of selected devices live data.
InTouch.getDevices(<Long[] List of deviceIds>,<includeInActive>,<ignoreBeacon>,<lastUpdateTime>,new IDeviceListener() {
@Override
public void onSuccess(DevicesResponse devicesResponse) {
// write your code here.
}
@Override
public void onError(String reason, String errorIdentifier, String errorDescription) {
// reason gives the error type.
// errorIdentifier gives information about error code.
// errorDescription gives a message for a particular error.
}
});
InTouch.getDevices(<Long[] List of deviceIds>,<includeInActive>,<ignoreBeacon>,<lastUpdateTime>,object : IDeviceListener {
override fun onSuccess(t: DevicesResponse?) {
// write your code here.
}
override fun onError(reason: String?, errorIdentifier: String?, errorDescription: String?) {
// reason gives the error type.
// errorIdentifier gives information about error code.
// errorDescription gives a message for a particular error.
}
})
c) Get a single device live data
InTouch.getDevice(<deviceId>,<lastUpdateTime>, new IDeviceListener() {
@Override
public void onSuccess(DevicesResponse devicesResponse) {
// write your code here.
} @Override
public void onError(String reason, String errorIdentifier, String errorDescription) {
// reason gives the error type.
// errorIdentifier gives information about error code.
// errorDescription gives a message for a particular error.
}
});
InTouch.getDevice(<deviceId>,<lastUpdateTime>, object : IDeviceListener {
override fun onSuccess(t: DevicesResponse?) {
// write your code here.
}
override fun onError(reason: String?, errorIdentifier: String?, errorDescription: String?) {
// reason gives the error type.
// errorIdentifier gives information about error code.
// errorDescription gives a message for a particular error.
}
})
deviceId
(Long) - This is the device IDincludeInActive
(Boolean) -If "true" then API response will include inactive devices along with active devices. If "false" then API will return only active devices.ignoreBeacon
(Boolean) - If set to "true" then API will return all devices except those with device type as a beacon(mobile).lastUpdateTime
(Long) - Give EPOCH timestamp in seconds to fetch only those live locations of devices that have come after the given timestamp. If "lastUpdateTime" is given then by default only active devices will be fetched irrespective of the status of "includeInActive" attribute else set the value as 0.
- 200: To denote a successful API call.
- 400: Bad Request, User made an error while creating a valid request.
- 401: Unauthorized, the Developer’s key is not allowed to send a request with restricted parameters.
- 403: Forbidden, the Developer’s key has hit its daily/hourly limit.
- 500: Internal Server Error, the request caused an error in our systems.
- 503: Service Unavailable, It comes during our maintenance break or server downtimes.
- 200: Success
- 203: Device Not Found
- 204: No Content Or No Data Found
- 400: Bad Request - Invalid device ID supplied or invalid data type. For example, the input attribute "id" is an integer but string value gets passed.
- 401: Unauthorized Request. Access to API is forbidden.
- 404: Not Found - URL Not Found
DevicesResponse
class object returns the API response as a JSON object.
id (Long)
- Id of the device.active (string)
- Device active statusstatus (string)
- Device movement statusvehicleBattery (Double)
- Device battery statuslocation (Location)
- Device live location object like latitude, longitude etc.deviceDetails(DeviceDetails)
- Device info object like name etc.alerts (Alerts)
- Alert objectcanInfo (CanInfo)
- Device CanInfo object.deviceFaults (ArrayList<DeviceFault>)
- List of various fault.currentGeofence (ArrayList<Long>)
- list of current geofences id.todaysDrive (TodaysDrive)
- TodaysDrive object.
gpsTime (Long)
- Time at which data is being fetched from the devicegprsTime (Long)
- Time at which data is being received at the server end.latitude (Double)
- Device location latitudelongitude (Double)
- Device location Longitudealtitude (Double)
- Device location Altitudeheading (Double)
- Angle at which is the device is movingspeedKph (Double)
- Device or vehicle's GPS based speed.address (String)
- Complete address of the location.odometer (Double)
- Either GPS or CAN Odometer based on the configuration.
deviceId (Long)
- Id of device.registrationNumber (String)
Device registration number.deviceType (String)
- Type of device like a car, truck, bus, bike, tractor, JCB, excavator, etc.
deviceId (Long)
- Id of device.timestamp (Long)
- EPOCH time at which alarm was generatedlatitude (Double)
- Location latitude of alarm.longitude (Double)
- Location longitude of alarm.address (String)
- Location address at which the alarm got generatedalarmType (Integer)
- Type of alarm to create. The following are the alarm types & their corresponding IDs.
IGNITION: 21, OVERSPEED: 22, UNPLUGGED: 23, PANIC: 24, GEOFENCE: 26, STOPPAGE: 27, IDLE: 28, TOWING: 29, GPRS CONNECTIVITY: 126, VEHICLE BATTERY: 129, MILEAGE: 133, GPS CONNECTIVITY: 146, DISTANCE COVERED: 151, INTERNAL BATTERY VOLTAGE:161limit (Integer)
- Alarm limit as set in the config. For example, if an Overspeed alarm set on the limit of 44 km/hr in the alarm config setting, then this attribute will return 44 km/hrduration (Long)
- Alarm duration limit as set in the alarm config section. For example, if the duration of Overspeed alarm is set as 20 secs, then the alarm will generate when the vehicle over speeds for a duration of 20 secsactualLimit (Integer)
- The actual data received from the device at that particular moment when the alarm got generated. For example, when the over-speed alert generated the vehicle actual speed was 56km/hr.actualDuration (Integer)
- Actual duration for which the device breached the alarm config limitseverity (Integer)
- 0:Low Severity. 1:High Severitydata (Integer)
- Describes the state of the alarm. IGNITION(type = 21), 0: OFF & 1: ON. AC(type=25), 0: OFF, 1: ON. GEOFENCE(type=26), 1: Entry & Exit Geofence 2: Entry Geofence, 3: Leaving Geofence & 4: Long Stay In GeofencegeofenceId (Long)
- Unique ID of the geofence for which the alarm got generated.
calcEngineVal (Integer)
- Calculated Engine value.greenDriveType (String)
- HA(Harsh acceleration), HB(Harsh Braking), HC(Harsh Cornering).canTimestamp (Long)
- Exact EPOCH time at which the CAN data got generated by the device.coolantTemp (Integer)
- Coolant temperature.engineRPM (Integer)
- Rpm value of engine.accelPedal (Double)
- This is accelerator pedal value in percentage.pedoMeter (Integer)
- Pedometer value in steps.parkBrake (Double)
- This is the parking brake. 0 means parking brake is disengaged & 1 means parking brake is engaged.brakePedal (Double)
- 1 means brake pedal is engaged & 0 means brake pedal is disengaged.fuelLevel (Integer)
- The level of the fuel in liters.driverDoor (Double)
- 1 means door is open & 0 means door is closed.passDoor (Double)
- 1 means door is open & 0 means door is closed.headLights (Double)
- 1 means ON & 0 means OFF.blinker (Double)
- 1 means ON & 0 means OFF.ac (Integer)
- 1 means AC is ON & 0 means AC is OFF.fuelConsAVG (Integer)
- Fuel constant average.intakeAirTemp (Double)
- Intake air temperature of the engine.intakeabsolutePress (Integer)
- Intake absolute pressure of the engine. It is defined in Pa(Pascal)
code (String)
- Fault code.timestamp (Long)
- Duration as EPOCH Time.status (Integer)
- Describes the status of the fault which was detected. 0: OPEN & 1: Close.closedOn (Long)
- The EPOCH time at which fault code closed. This will come for the closed case.
todayKms (Double)
- Distance in Km(s).todayMovementTime (Long)
- Movement time in sec(s).todayIdleTime (Long)
- Idle time in sec(s).todayDriveCount (Long)
- Drive count for today.
Below method returns the basic info of devices such as their registration number, type of entity, manufacturer etc.
InTouch.getDevicesInfo(new IDeviceInfoListener() {
@Override
public void onSuccess(DeviceInfoResponse response) {
// write your code here.
}
@Override
public void onError(String reason, String identifier, String description) {
// reason gives the error type.
// errorIdentifier gives information about error code.
// errorDescription gives a message for a particular error.
}
});
InTouch.getDevicesInfo(object : IDeviceInfoListener{
override fun onSuccess(t: DeviceInfoResponse ?) {
// write your code here.
}
override fun onError(reason: String?, errorIdentifier: String?, errorDescription: String?) {
// reason gives the error type.
// errorIdentifier gives information about error code.
// errorDescription gives a message for a particular error.
}
})
InTouch.getDevicesInfo(<array of device id(s)>, new IDeviceInfoListener() {
@Override
public void onSuccess(DeviceInfoResponse response) {
// write your code here.
}
@Override
public void onError(String reason, String identifier, String description) {
// reason gives the error type.
// errorIdentifier gives information about error code.
// errorDescription gives a message for a particular error.
}
});
InTouch.getDevicesInfo(<array of device id(s)>, object : IDeviceInfoListener{
override fun onSuccess(t: DeviceInfoResponse ?) {
// write your code here.
}
override fun onError(reason: String?, errorIdentifier: String?, errorDescription: String?) {
// reason gives the error type.
// errorIdentifier gives information about error code.
// errorDescription gives a message for a particular error.
}
})
id
(Long) - This is the device ID. You may pass single or multiple ids in an array.
- 200: To denote a successful API call.
- 400: Bad Request, User made an error while creating a valid request.
- 401: Unauthorized, the Developer’s key is not allowed to send a request with restricted parameters.
- 403: Forbidden, the Developer’s key has hit its daily/hourly limit.
- 500: Internal Server Error, the request caused an error in our systems.
- 503: Service Unavailable, It comes during our maintenance break or server downtimes.
- 200: Success
- 203: Device Not Found
- 400: Bad Request - Invalid device ID supplied or invalid data type. For example, the input attribute "id" is an integer but string value gets passed.
- 401: Unauthorized Request. Access to API is forbidden.
- 404: Not Found - URL Not Found
DeviceInfoResponse
class object returns the API response as a JSON object.
id (Integer)
- Id of the device.name(string)
- Name of the device.type(Integer)
- Type of entity like 0 - car, 1 - person, 2 - asset, 3 - bike, 4 - bus, 5 - truck, 6 - tractor.creationOn(long)
- Date when the device was created.updationOn(long)
- Date when device info got updated.expiryDate(long)
- Date when device validity subscription will get expired.active(Boolean)
- Whether device is active or not.registrationNumber(String)
- Device's registration number.manufacturer(String)
- Device manufactured by.model(String)
- Device's model type.color(String)
- Color of the device.geofenceIds(List<Integer>)
- IDs of the geofences associated with the device.tag(List<String>)
- Tag of the vehicle with the custom string valuechasisNo
- Chassis number of the device.initialOdometer
- Initial odometer reading.
For any queries and support, please contact:
Email us at [email protected]
Need support? contact us!