Hours of Service Android Integration Intents

The VisTracks Hours of Service android application provides some components that can be launched from your android application. This will allow you to display some activities of our Hours of Service android app with just a click of a button from your android app or in any way you want.
NOTE: Make sure you've installed the latest Hours of Service android application to make the integration work.

Intents

Action Name Description
"com.vistracks.intent.action.HOS_ACCOUNT_SETTINGS" Broadcast Action: Retrieves the following account settings (Allow Personal Conveyance, Allow Yard Moves, Team Driving Supported).
"com.vistracks.intent.action.HOS_CHANGE_DRIVER_HISTORY" Broadcast Action: Adds a new driver history event based from specified information.
"com.vistracks.intent.action.HOS_CHANGE_SHIPPING_MANIFEST" Broadcast Action: Add or Remove shipping manifest from HOS application.
"com.vistracks.intent.action.HOS_CHANGE_TRAILER" Broadcast Action: Performs Hook/Drop Trailers.
"com.vistracks.intent.action.HOS_DASHBOARD" Activity Action: Shows Hours of Service Dashboard.
"com.vistracks.intent.action.HOS_DRIVER_HISTORY_UPDATE" A broadcast message being sent from HOS app every duty status changes.
"com.vistracks.intent.action.HOS_DRIVER_STATUS_UPDATE" A broadcast message being sent from HOS app every 1 minute, Filter this action to retrieve driving metrics.
"com.vistracks.intent.action.HOS_DRIVER_VIOLATION_UPDATE" A broadcast message being sent from HOS app if a violation occurs.
"com.vistracks.intent.action.HOS_DRIVER_WARNING_UPDATE" A broadcast message being sent from HOS app if a violation warning occurs.
"com.vistracks.intent.action.HOS_DVIR" Activity Action: Starts Vehicle Inspection. This provides a user interface that allows users to determine what inspection points needs to be inspected.
"com.vistracks.intent.action.HOS_ELD_LOGIN" Broadcast Action: Performs vbus device connection by sending vbus device information via intent.
"com.vistracks.intent.action.HOS_ELD_LOGOUT Broadcast Action: Performs vbus device disconnection.
"com.vistracks.intent.action.HOS_ELD_MALFUNCTION_UPDATE" A broadcast message being sent from HOS app every new diagnostic or malfunction is recorded or being cleared
"com.vistracks.intent.action.HOS_EXCEPTION" Activity Action: Launches Add Exception Dialog.
"com.vistracks.intent.action.HOS_GAIN_TIME" Activity Action: Launches Gain Time At Dialog.
"com.vistracks.intent.action.HOS_GET_CERTIFIED_LOG_PDF" Broadcast Action: Performs a request to retrieve the certified log pdf file.
"com.vistracks.intent.action.HOS_GET_DRIVERS_PROFILE" Broadcast Action: Performs retrieval of driver's profile who currently logged in.
"com.vistracks.intent.action.HOS_GET_EQUIPMENT_LIST" Broadcast Action: Performs retrieval of equipment options (Vehicle/Trailer) that can be used to switch the selected equipment of the current logged in driver.
"com.vistracks.intent.action.HOS_GET_LOGGED_IN_USERS" Broadcast Action: Performs retrieval of logged in users that can be used on switching drivers.
"com.vistracks.intent.action.HOS_GET_SHIPPING_MANIFEST" Broadcast Action: Performs retrieval of shipping manifest from HOS application.
"com.vistracks.intent.action.HOS_HISTORY_CHANGE_DIALOG" Activity Action: Launches History Change Dialog.
"com.vistracks.intent.action.HOS_LOGIN" Activity Action: Performs Login action to Hours of Service Application.
"com.vistracks.intent.action.HOS_LOGIN_DETAILS" A broadcast message being sent from HOS app every driver login with its username and a boolean that will determine if his the current primary driver.
"com.vistracks.intent.action.HOS_LOGOUT" Activity Action: Performs Logout action from Hours of Service Application.
"com.vistracks.intent.action.HOS_LOGOUT_DETAILS" A broadcast message being sent from HOS app every driver logout, a similar to driver login broadcast message.
"com.vistracks.intent.action.HOS_LOG_REVIEW" Activity Action: Provides a user interface to review driver's daily log which can be used for roadside inspection.
"com.vistracks.intent.action.HOS_MALFUNCTION_EVENTS_DIALOG" Activity Action: Launches Malfunction events dialog.
"com.vistracks.intent.action.HOS_MANUAL_VBUS_CONNECTION_DIALOG" Activity Action: Launches vbus list connection dialog. It will return error code 115 if no vehicle selected for the current logged in user
"com.vistracks.intent.action.HOS_OPEN" Activity Action: Launches Hours of Service application without losing previous activities stack via intent.
"com.vistracks.intent.action.HOS_PENDING_EDIT_REQUESTS" Broadcast Action: Retrieves number of pending edits via broadcast message.
"com.vistracks.intent.action.HOS_PENDING_HISTORY_CHANGES_DIALOG" Activity Action: Launches Pending Edits Dialog.
"com.vistracks.intent.action.HOS_RECAP" Activity Action: Launches Recap Dialog.
"com.vistracks.intent.action.HOS_SET_LOCKSCREEN_DISABLED" Broadcast Action: Disabling lockscreen of HOS app.
"com.vistracks.intent.action.HOS_SWITCH_DRIVER" Broadcast Action: Switch currently logged in driver.
"com.vistracks.intent.action.HOS_SWITCH_DRIVER_DETAILS" A broadcast message being sent from HOS app every switch driver which will include information of who is the new primary driver and who are the co-drivers.
"com.vistracks.intent.action.HOS_SWITCH_VEHICLE" Broadcast Action: Switching vehicle of the current logged in driver.
"com.vistracks.intent.action.HOS_TIME_REMAINING" Activity Action: Launches Time Remaining dialog.
"com.vistracks.intent.action.HOS_UNCERTIFIED_LOGS_DIALOG" Activity Action: Launches a dialog showing a list of logs that needs to be certified.
"com.vistracks.intent.action.HOS_VBUS_CONNECTION_CHANGED" Broadcast Action: This will request VBUS connection status from HOS app.
"com.vistracks.intent.action.HOS_VBUS_DATA_UPDATE" A broadcast message being sent from HOS app every changes of vbus data values ex: odometer.
"com.vistracks.intent.action.HOS_VEHICLE_STARTED_MOVING" Broadcast Action: A broadcast message being sent from HOS app every time a vehicle is in motion.
"com.vistracks.intent.action.HOS_VEHICLE_QUERY" Broadcast Action: Returns information of the vehicle being queried.
"com.vistracks.intent.action.HOS_VEHICLE_UPDATE" Broadcast Action: Updates the vehicle information that being passed from parameters.
"com.vistracks.intent.action.HOS_WVA_CONNECT" Broadcast Action: Performs a test connection of vbus device.
"com.vistracks.intent.action.HOS_WVA_DISCONNECT" Broadcast Action: Performs disconnection vbus device from previous test connection.
"com.vistracks.intent.action.LOGS_CERTIFIED" A broadcast message being sent from HOS app every time a driver certifies his log.
"com.vistracks.intent.action.SHIPMENT_CHANGED" A broadcast message being sent from HOS app to notify that the shipment has been changed.

Driver Login

This will allow driver to login to HOS app via intent. It will prompt the HOS app login screen when the parameter password is empty. The username on the login screen will be auto populated based on the userId and domain being sent.

Action Name
"com.vistracks.intent.action.HOS_LOGIN"
Parameters
Extras Data Type Description
"HOS_USER_ID" String The user id to login.
"HOS_DOMAIN" String The domain of the user to login.
"HOS_PASSWORD" String Password of the user logging in. (In case of empty password HOS app should prompt login screen)
"HOS_SHOW_EULA" Boolean Whether to show eula if not yet accepted. Can either be:

  • True
  • False (default)
"HOS_SHOW_LOGIN_FAILED_DIALOG" Boolean Used as a boolean extra field to override the default action of showing login failed dialog. Can either be:

  • True (default)
  • False
Response
Action Name
"com.vistracks.intent.action.HOS_LOGIN_RESULT"
Extras Data Type Description
"RESULT_DESC" String The result description.
"RESULT_CODE" Integer The result code.
"HOS_EXTRA_AVAILABLE_DRIVE" String The available drive time of a driver. Duration formatted string (ex: "PT59S")
"HOS_EXTRA_AVAILABLE_SHIFT" String The available shift time of a driver. Duration formatted string (ex: "PT59S")
Result Codes
Result Code Description
-1 Login successful.
10 Failed to retrieve Account information.
11 Login cancelled.
12 Invalid user id or password.
13 No network connection.
14 Error setting up account.
15 Login has timeout.
16 An unknown exception has occurred.
17 User already logged-in.
18 User id or domain is required.

Account Settings

Retrieves account settings via broadcast message.

Action Name
"com.vistracks.intent.action.HOS_ACCOUNT_SETTINGS"
Parameters
Extras Data Type Description
"REQUEST_CODE" Integer The request code.
Response
Action Name
"com.vistracks.intent.action.HOS_ACCOUNT_SETTINGS_RESULT"
Extras Data Type Description
"RESULT_CODE" Integer The result code.
"RESULT_DESC" String The result description.
"REQUEST_CODE" Integer The request code being set upon sending the broadcast request.
"HOS_EXTRA_ACCOUNT_SETTINGS_JSON" String The account settings formatted as json string.

example:

	{
		"personalConveyanceAllowed": "true",
		"yardMovesAllowed": "false",
                "isTeamDrivingSupported": "true"
	}
Result Codes
Result Code Description
-1 Successfully retrieved account settings.
2 "Unknown error occurred"

Driver Logout

Logs out of the Hours of Service Application.

Action Name
"com.vistracks.intent.action.HOS_LOGOUT"
Parameters
Extras Data Type Description
"HOS_SHOW_LOGOUT_DIALOG" Boolean Used as a boolean extra field to override the default action of showing logout dialogs. Can either be:

  • True (default)
  • False
Response
Action Name
"com.vistracks.intent.action.HOS_LOGOUT_RESULT"
Extras Data Type Description
"RESULT_DESC" String The result description.
"RESULT_CODE" Integer The result code.
Result Codes
Result Code Description
-1 Logout successfully.
13 Logout failed. No network connection..

Driver History Change

This will change the current driver status via broadcast message intent.

Action Name
"com.vistracks.intent.action.HOS_CHANGE_DRIVER_HISTORY"
Parameters
Extras Data Type Description
"HOS_EVENT_TIME" String The history/status event time. (ex: "2016-09-02T02:33:56.152Z") Default: Current device time
"HOS_EVENT_TYPE" String The history/status type .(ex: "OffDuty")
"HOS_EVENT_NOTE" String The notes/annotation of this history change. (ex: "Break Time")
"HOS_EVENT_LOCATION" String The location for this event. (ex: "2mi E South Holland, IL")
"HOS_EVENT_REASON_CODE" String The reason for editing the event. (ex: "Incorrect Data Entered")
"REQUEST_CODE" Integer The request code.
Response
Action Name
"com.vistracks.intent.action.HOS_CHANGE_DRIVER_HISTORY_RESULT"
Extras Data Type Description
"RESULT_DESC" String The result description.
"RESULT_CODE" Integer The result code.
"REQUEST_CODE" Integer The request code being set upon sending the broadcast request.
Result Codes
Result Code Description
-1 History changed successful.
40 Failed to change driver history.

Driver's Profile

This will retrieve driver's profile who currently logged in.

Action Name
"com.vistracks.intent.action.HOS_GET_DRIVERS_PROFILE"
Response
Action Name
"com.vistracks.intent.action.HOS_GET_DRIVERS_PROFILE_RESULT"
Extras Data Type Description
"RESULT_DESC" String The result description.
"RESULT_CODE" Integer The result code.
"HOS_EXTRA_DP_FIRST_NAME" String The driver's first name.
"HOS_EXTRA_DP_LAST_NAME" String The driver's last name.
"HOS_EXTRA_DP_DRIVER_ID" Long The driver's ID.
"HOS_EXTRA_DP_CARRIER_NAME" String The carrier name.
"HOS_EXTRA_DP_CARRIER_DOT_NUMBER" String The carrier dot number.
"HOS_EXTRA_DP_DRIVING_RULE" String The current driving rule used by driver.
"HOS_EXTRA_DP_HOME_TERMINAL_TIMEZONE" org.joda.time.DateTimeZone The home terminal timezone used throughout the application.
Result Codes
Result Code Description
-1 Driver's profile successfully retrieved.
1 No driver logged in..

Get Equipment List

This will retrieve equipment options (Vehicle/Trailer) that can be used to switch the selected equipment of the current logged in driver via broadcast message.

Action Name
"com.vistracks.intent.action.HOS_GET_EQUIPMENT_LIST"
Parameters
Extras Data Type Description
"HOS_EQUIPMENT_TYPE" String The type of equipment to retrieve ("All", "Vehicle", "Trailer")

Default: "Vehicle"

"REQUEST_CODE" Integer The request code.
Response
Action Name
"com.vistracks.intent.action.HOS_GET_EQUIPMENT_LIST_RESULT"
Extras Data Type Description
"RESULT_CODE" Integer The result code.
"RESULT_DESC" String The result description.
"REQUEST_CODE" Integer The request code being set upon sending the broadcast request.
"HOS_EXTRA_EQUIPMENTS_JSON" String The equipment list formatted as json string.

example:

[
	{
		"equipmentType": "Vehicle",
		"equipmentName": "Truck1",
		"equipmentClientId": 10,
		"selected": false
	},
	{
		"equipmentType": "Vehicle",
		"equipmentName": "Truck2",
		"equipmentClientId": 4,
		"selected": true
	}
]
Result Codes
Result Code Description
-1 Equipments successfully retrieved.
90 "Unknown specified equipment type"

Get Logged In Users

This will retrieve logged in users that can be used on switching drivers via broadcast message.

Action Name
"com.vistracks.intent.action.HOS_GET_LOGGED_IN_USERS"
Parameters
Extras Data Type Description
"REQUEST_CODE" Integer The request code.
Response
Action Name
"com.vistracks.intent.action.HOS_GET_LOGGED_IN_USERS_RESULT"
Extras Data Type Description
"RESULT_CODE" Integer The result code.
"RESULT_DESC" String The result description.
"REQUEST_CODE" Integer The request code being set upon sending the broadcast request.
"HOS_EXTRA_LOGGED_IN_USERS_JSON" String The logged in users formatted as json string.

example:

[
	{
		"userEmail": "first.driver@domain.com",
		"userClientId": 1
	},
	{
		"userEmail": "second.driver@domain.com",
		"userClientId": 2
	}
]
Result Codes
Result Code Description
-1 Logged in users successfully retrieved.
2 Unknown Error Occured

Get Shipment

This will retrieve current shipment details.

Action Name
"com.vistracks.intent.action.HOS_GET_SHIPPING_MANIFEST"
Response
Action Name
"com.vistracks.intent.action.HOS_GET_SHIPPING_MANIFEST_RESULT"
Extras Data Type Description
"RESULT_DESC" String The result description.
"RESULT_CODE" Integer The result code.
"HOS_EXTRA_SM_DRIVER_ID" Long The unique ID of the driver who deliver this shipment.
"HOS_EXTRA_SM_SHIPPER_NAME" String The name of the shipping company.
"HOS_EXTRA_SM_DOCUMENT_NUMBERS" String[] The document numbers of the shipments.
"HOS_EXTRA_SM_COMMODITY" String[] The type of commodity in the shipment.
Result Codes
Result Code Description
-1 Shipment details successfully retrieved.
1 No driver logged in..

Modify Shipment

This allows adding and removing of shipping document via intent.

Action Name
"com.vistracks.intent.action.HOS_CHANGE_SHIPPING_MANIFEST"
Parameters
Extras Data Type Description
"HOS_ACTION_TYPE" String This will identify if add or remove. Values will be ("ADD" or "REMOVE")
"HOS_SHIPMENT_ID" String[] Shipment ID string array value to add/remove.
"HOS_SHIPMENT_DESCRIPTION" String[] Shipment Description string array value to add/remove.
"REQUEST_CODE" Integer The request code.
Response
Action Name
"com.vistracks.intent.action.HOS_CHANGE_SHIPPING_MANIFEST_RESULT"
Extras Data Type Description
"RESULT_CODE" Integer The result code.
"RESULT_DESC" String The result description.
"REQUEST_CODE" Integer The request code being set upon sending the broadcast request.
Result Codes
Result Code Description
-1 ADD/REMOVE successfully.
1 No Authenticated User.
20 Add shipment failed, Unknown error occured.
21 Remove shipment failed, Unknown error occured.

DVIR

This will start an inspection via intent, can either vehicle or trailer by just passing the parameters

Action Name
"com.vistracks.intent.action.HOS_DVIR"
Parameters
Extras Data Type Description
"HOS_DVIR_VEHICLE_NAME" String ID of the vehicle to be inspected
"HOS_DVIR_TRAILER_NAME" String ID of the trailer to be inspected
"HOS_DVIR_INSPECTOR_TYPE" String Type of user who will conduct the inspection. Can either be:

  • "DRIVER"
  • "MECHANIC"
  • "OTHER"
"HOS_DVIR_TRIP_TYPE" String Type of trip set in the inspection. Can either be:

  • "PRE_TRIP"
  • "POST_TRIP"
  • "AD_HOC"
Response
Action Name
"com.vistracks.intent.action.HOS_DVIR_RESULT"
Extras Data Type Description
"RESULT_DESC" String The result description.
"RESULT_CODE" Integer The result code.
Result Codes
Result Code Description
-1 DVIR successfully completed
0 DVIR was cancelled.
50 Equipment to inspect was not found.
51 Inspection failed, unknown error occured.
52 Invalid inspector type.
53 Invalid trip type.
54 No Equipment to inspect.

Switch Driver

This will switch the driver via broadcast message intent.

Action Name
"com.vistracks.intent.action.HOS_SWITCH_DRIVER"
Parameters
Extras Data Type Description
"HOS_SD_DRIVER_EMAIL" String The driver's email to switch to (ex: "second.driver@domain.com")
"HOS_SD_DRIVER_CLIENT_ID" Long (Optional) The driver's client id to switch to if driver's email was not provided (ex: "2")
"HOS_SD_MAKE_DRIVER" Boolean Whether this will make the switch driver as the main driver (handling the wheels)

Default: True

"REQUEST_CODE" Integer The request code.
Response
Action Name
"com.vistracks.intent.action.HOS_SWITCH_DRIVER_RESULT"
Extras Data Type Description
"RESULT_CODE" Integer The result code.
"RESULT_DESC" String The result description.
"REQUEST_CODE" Integer The request code being set upon sending the broadcast request.
Result Codes
Result Code Description
-1 Successfully switch driver.
2 Unknown Error Occurred
100 Can Either be "No driver to switch" if parameters are not specified or "Unknown driver to switch"
if driver was not found

Switch Vehicle

This will switch the vehicle of the current logged in driver via broadcast message intent.

Action Name
"com.vistracks.intent.action.HOS_SWITCH_VEHICLE"
Parameters
Extras Data Type Description
"HOS_SV_VEHICLE_NAME" String The vehicle name to switch to (ex: "Truck1")
"HOS_SV_VEHICLE_ID" Long (Optional) The vehicle id to switch to if vehicle name was not provided (ex: "10")
"REQUEST_CODE" Integer The request code.
Response
Action Name
"com.vistracks.intent.action.HOS_SWITCH_VEHICLE_RESULT"
Extras Data Type Description
"RESULT_CODE" Integer The result code.
"RESULT_DESC" String The result description.
"REQUEST_CODE" Integer The request code being set upon sending the broadcast request.
Result Codes
Result Code Description
-1 Successfully switch vehicle.
91 Can Either be "No vehicle to switch" if parameters are not specified or "Unknown vehicle to switch"
if vehicle was not found
92 "Currently driving. Unable to switch vehicle" - if driver is currently driving

"Daily Log was already certified. Unable to switch vehicle" - if daily log was already certified

"Currently connected to vbus device. Unable to switch vehicle" - if previous vehicle was currently connected to vbus device

Vehicle Query

This will query the current selected vehicle of the driver via broadcast message intent or query a particular vehicle information.

Action Name
"com.vistracks.intent.action.HOS_VEHICLE_QUERY"
Parameters
Extras Data Type Description
"HOS_VQ_VEHICLE_NAME" String The name of the vehicle to query. (ex: "Truck1")

Default: Driver's current selected vehicle

"REQUEST_CODE" Integer The request code.
Response
Action Name
"com.vistracks.intent.action.HOS_VEHICLE_QUERY_RESULT"
Extras Data Type Description
"RESULT_DESC" String The result description.
"RESULT_CODE" Integer The result code.
"REQUEST_CODE" Integer The request code being set upon sending the broadcast request.
"HOS_EXTRA_VQ_LICENSE_PLATE" String The license plate of the vehicle.
"HOS_EXTRA_VQ_LICENSE_PLATE_STATE" String The country state abbreviation for the license plate. (ex: "IL")
"HOS_EXTRA_VQ_VEHICLE_NAME" String The vehicle name. (ex: "Truck1")
"HOS_EXTRA_VQ_VIN" String The VIN of the vehicle. (ex: "1GCEK14M1WE189515")
"HOS_EXTRA_VQ_VBUS_DEVICE" String The Vbus Device configured on vehicle. (ex: "Geometris")
"HOS_EXTRA_VQ_DEVICE_CONNECTION_TYPE" String The connection type of the vbus device configured. (ex: "WiFi Direct Pin Mode")
"HOS_EXTRA_VQ_DEVICE_DESCRIPTION" String The vbus device description, usually only be set on serial vbus device connection.
"HOS_EXTRA_VQ_DEVICE_MAC_ADDRESS" String The MAC address of the vbus device. (ex: "5C:EB:68:F1:E6:C6")
"HOS_EXTRA_VQ_DEVICE_MANUFACTURER" String The manufacturer information of vbus device.
"HOS_EXTRA_VQ_DEVICE_NAME" String The vbus device name.
"HOS_EXTRA_VQ_DEVICE_WIFI_AP_SSID" String The WiFi AP SSID of wifi direct vbus devices.
"HOS_EXTRA_VQ_DEVICE_WIFI_SSID" String The WiFi SSID of wifi direct vbus devices.
Result Codes
Result Code Description
-1 Successfully retrieved vehicle information.
61 The vehicle name queried was not a vehicle
62 Can either be "Unknown vehicle name" if queried a particular vehicle, or "No current vehicle selected" when driver has not yet selected a vehicle.

Vehicle Update

This will update information of the specified vehicle via broadcast message intent.

Action Name
"com.vistracks.intent.action.HOS_VEHICLE_UPDATE"
Parameters
Extras Data Type Description
"HOS_VU_VEHICLE_NAME" String The vehicle's name to update information. (ex: "Truck1")
"HOS_VU_LICENSE_PLATE" String The license plate to set.
"HOS_VU_LICENSE_PLATE_STATE" String The country state abbreviation for the license plate to set. (ex: "IL")
"HOS_VU_VIN" String The VIN of the vehicle to be set. (ex: "1GCEK14M1WE189515")
"HOS_VU_VBUS_DEVICE" String The Vbus Device to configure on vehicle. (ex: "Geometris")
"HOS_VU_DEVICE_CONNECTION_TYPE" String The connection type of the vbus device to configure. (ex: "WiFi Direct Pin Mode")
"HOS_VU_DEVICE_DESCRIPTION" String The vbus device description, usually only be set on serial vbus device connection.
"HOS_VU_DEVICE_MAC_ADDRESS" String The MAC address of the vbus device to be set. (ex: "5C:EB:68:F1:E6:C6")
"HOS_VU_DEVICE_MANUFACTURER" String The manufacturer information of vbus device.
"HOS_VU_DEVICE_NAME" String The vbus device name.
"HOS_VU_DEVICE_WIFI_AP_SSID" String The WiFi AP SSID of wifi direct vbus devices.
"HOS_VU_DEVICE_WIFI_SSID" String The WiFi SSID of wifi direct vbus devices.
"REQUEST_CODE" Integer The request code.
Response
Action Name
"com.vistracks.intent.action.HOS_VEHICLE_UPDATE_RESULT"
Extras Data Type Description
"RESULT_DESC" String The result description.
"RESULT_CODE" Integer The result code.
"REQUEST_CODE" Integer The request code being set upon sending the broadcast request.
Result Codes
Result Code Description
-1 Successfully updated vehicle information.
2 User is not authorized to edit vehicle information.
60 "Cannot set invalid vin" - Setting an invalid vin
61 The vehicle name specified was not a vehicle
62 "vehicle name is null" - no vehicle name specified
"Unknown vehicle name" - vehicle not found
63 "Vehicle update failed" - unable to complete vehicle update due to unknown error

Broadcast for Driving Status Updates

A broadcast message being sent every 1 minute, Filter this action to retrieve driving metrics.

Action Name
"com.vistracks.intent.action.HOS_DRIVER_STATUS_UPDATE"
Extras Data Type Description
"HOS_EXTRA_DS_USERNAME" String The username currently logged in.
"HOS_EXTRA_DS_EVENT_TIME" String The last history/status event time. (ex: "2016-09-02T02:33:56.152Z")
"HOS_EXTRA_DS_EVENT_TYPE" String The last history/status type .(ex: "OffDuty")
"HOS_EXTRA_DS_EVENT_SUBTYPE" String The sub type of this history/status. Can be:

  • PersonalUse
  • YardMoves
"HOS_EXTRA_DS_AVAILABLE_CYCLE" String The available cycle time of the driver.This is a duration string format value (ex: "PT287S")
"HOS_EXTRA_DS_AVAILABLE_SHIFT" String The available shift time of the driver.This is a duration string format value (ex: "PT287S")
"HOS_EXTRA_DS_AVAILABLE_DRIVE" String The available drive time of the driver.This is a duration string format value (ex: "PT287S")
"HOS_EXTRA_DS_AVAILABLE_DRIVE_UNTIL_BREAK" String The available drive time until break. This is a duration string format value (ex: "PT287S")
"HOS_EXTRA_DS_CYCLE_LIMIT" String The cycle limit of the driver on his current driving rule. This is a duration string format value (ex: "PT287S")
"HOS_EXTRA_DS_SHIFT_LIMIT" String The shift limit of the driver on his current driving rule. This is a duration string format value (ex: "PT287S")
"HOS_EXTRA_DS_DRIVE_LIMIT" String The drive limit of the driver on his current driving rule. This is a duration string format value (ex: "PT287S")
"HOS_EXTRA_DS_BREAK_LIMIT" String The break limit of the driver on his current driving rule. This is a duration string format value (ex: "PT287S")
"HOS_EXTRA_DS_GAIN_TIME_WHEN" String When the gain time happen. (ex: "2016-09-02T02:33:56.152Z")
"HOS_EXTRA_DS_GAIN_TIME_HOW_MUCH" String How much gain time does a driver has. This is a duration string format value (ex: "PT287S")

Broadcast for Driver History Updates

A broadcast message being sent every duty status changes.

Action Name
"com.vistracks.intent.action.HOS_DRIVER_HISTORY_UPDATE"
Extras Data Type Description
"HOS_EXTRA_DH_USERNAME" String The username of the driver for this history event.
"HOS_EXTRA_DH_EVENT_TIME" String The history/status event time. (ex: "2016-09-02T02:33:56.152Z")
"HOS_EXTRA_DH_EVENT_TYPE" String The history/status type .(ex: "OffDuty")
"HOS_EXTRA_DH_ODOMETER_KM" Double The odometer in km for this history event (ex: "125.0")
"HOS_EXTRA_DH_VIN" String The vin of currently used vehicle (ex: "QWERTY")
"HOS_EXTRA_DH_ENGINE_HOURS" String The current total engine hours. This is a duration string format value (ex: "PT287S")
"HOS_EXTRA_DH_DISTANCE_LAST_GPS_KM" Double The current distance in km since last valid gps (ex: "125.0")
"HOS_EXTRA_DH_NOTES" String The notes/annotation of this history change. (ex: "Shipping Boxes")

Un-Certified Logs Dialog

Launches a dialog via startActivity showing a list of logs that needs to be certified.

Action Name
"com.vistracks.intent.action.HOS_UNCERTIFIED_LOGS_DIALOG"
Response
Action Name
"com.vistracks.intent.action.HOS_UNCERTIFIED_LOGS_DIALOG_RESULT"
Extras Data Type Description
"RESULT_DESC" String The result description.
"RESULT_CODE" Integer The result code.
Result Codes
Result Code Description
110 No logs needs to be certified.

Broadcast for VBUS Connection Changes

This will request VBUS connection status via broadcast message intent.

NOTE: "com.vistracks.intent.action.HOS_VBUS_CONNECTION_CHANGED_RESULT" will also be sent every connection status changed without the request action as long as there is a broadcast receiver registered for this result action.

Action Name
"com.vistracks.intent.action.HOS_VBUS_CONNECTION_CHANGED"
Response
Action Name
"com.vistracks.intent.action.HOS_VBUS_CONNECTION_CHANGED_RESULT"
Extras Data Type Description
"HOS_EXTRA_VC_STATUS" String The VBUS Connection Status. Can be:

  • CONNECTING
  • CONNECTED
  • DISCONNECTED

Broadcast for VBUS Data Updates

A broadcast message when Odometer changes for applications that want to consume the odometer

Action Name
"com.vistracks.intent.action.HOS_VBUS_DATA_UPDATE"
Extras Data Type Description
"HOS_EXTRA_VD_VEHICLE_NAME" Long The id of the vehicle currently in used.
"HOS_EXTRA_VD_ODOMETER_KM" Double The current odometer in km. (ex: "125.0")
"HOS_EXTRA_VD_IS_MOVING" Boolean The current movement status. (ex: "true")
"HOS_EXTRA_VD_IS_IGNITION_ON" Boolean The current ignition status. (ex: "false")
"HOS_EXTRA_VD_SPEED_KPH" Double The current speed in kph. (ex: "125.0")
"HOS_EXTRA_VD_ENGINE_RPM" Double The current engine RPM. (ex: "125.0")
"HOS_EXTRA_VD_ENGINE_HOURS" Double The current engine hours. (ex: "2.0")
"HOS_EXTRA_VD_LATITUDE" Double The current latitude. (ex. "41.8911622")
"HOS_EXTRA_VD_LONGITUDE" Double The current longitude. (ex. "-87.6235815")

Broadcast for Driver Violation Updates

This intent will send a violation update when there is new violation occurred.

Action Name
"com.vistracks.intent.action.HOS_DRIVER_VIOLATION_UPDATE"
Extras Data Type Description
"HOS_EXTRA_DV_USER_NAME" String The current driver username
"HOS_EXTRA_DV_ICON_LABEL" ArrayList List of violations icon label
"HOS_EXTRA_DV_DRIVING_RULE_TYPE" ArrayList List of violations driving rules type
"HOS_EXTRA_DV_TIMESTAMP" ArrayList List of violations timestamp
"HOS_EXTRA_DV_TITLE" ArrayList List of violations title
"HOS_EXTRA_DV_MESSAGE" ArrayList List of violations message

Broadcast for Driver Warning Updates

This intent will send a warnings update when there is new warning occurred.

Action Name
"com.vistracks.intent.action.HOS_DRIVER_WARNING_UPDATE"
Extras Data Type Description
"HOS_EXTRA_DW_USER_NAME" String The current driver username
"HOS_EXTRA_DW_DRIVING_RULE_TYPE" ArrayList List of warnings driving rules type
"HOS_EXTRA_DW_TIMESTAMP" ArrayList List of warnings timestamp
"HOS_EXTRA_DW_TITLE" ArrayList List of warnings title
"HOS_EXTRA_DW_MESSAGE" ArrayList List of warnings message

Broadcast for ELD Diagnostic or Malfunction Updates

This intent will send a broadcast message when there is new diagnostic/malfunction occurred or cleared.

Action Name
"com.vistracks.intent.action.HOS_ELD_MALFUNCTION_UPDATE"
Extras Data Type Description
"HOS_EXTRA_EM_EVENT_CODE" String The eld diagnostic/malfunction code
"HOS_EXTRA_EM_EVENT_DESCRIPTION" String Description of this event recorded
"HOS_EXTRA_EM_EVENT_TIME" String The diagnostic/malfunction event time. (ex: "2017-06-09T01:23:56.152Z")
"HOS_EXTRA_EM_EVENT_TYPE" String A type of this event to determine what diagnostic/malfunction has been occurred

Broadcast for every Driver Login/Logout

This intent will send a broadcast message every time there is a driver login/logout.

Action Name
"com.vistracks.intent.action.HOS_LOGIN_DETAILS"
"com.vistracks.intent.action.HOS_LOGOUT_DETAILS"
Extras Data Type Description
"HOS_EXTRA_LD_USERNAME" String The username of the driver who logs in/out
"HOS_EXTRA_LD_IS_PRIMARY" Boolean Whether the driver who logs in/out is primary driver

Pending Edit Requests

This will return the number of pending edits for particular user logged in.

Action Name
"com.vistracks.intent.action.HOS_PENDING_EDIT_REQUESTS"
Parameters
Extras Data Type Description
"REQUEST_CODE" Integer The request code.
Response
Action Name
"com.vistracks.intent.action.HOS_PENDING_EDIT_REQUESTS_RESULT"
Extras Data Type Description
"RESULT_CODE" Integer The result code.
"RESULT_DESC" String The result description.
"REQUEST_CODE" Integer The request code being set upon sending the broadcast request.
"HOS_EXTRA_NUMBER_OF_PENDING_REQUESTS_JSON" String The list of users with their corresponding pending edits formatted as json string.

example:

[
	{
		"accountName": "driver1@domain.com",
		"pendingRequestCount": 3
	},
	{
		"accountName": "driver2@domain.com",
		"pendingRequestCount": 0
	}
]
Result Codes
Result Code Description
-1 Successfully retrieved pending edits.
2 "Unknown error occurred"

Get Certified Log PDF

This will allow other application to retrieve the certified log pdf file generated by HOS application.

Action Name
"com.vistracks.intent.action.HOS_GET_CERTIFIED_LOG_PDF"
Parameters
Extras Data Type Description
"CL_DATE" String The specific certified log date. (ex: "2017-04-04")
"REQUEST_CODE" Integer The request code.
Response
Action Name
"com.vistracks.intent.action.HOS_GET_CERTIFIED_LOG_PDF_RESULT"
Extras Data Type Description
"HOS_EXTRA_CL_PDF_FILE" android.os.Parcelable The PDF file Uri.
"CL_DATE" String The specific certified log date. (ex: "2017-04-04")
"RESULT_DESC" String The result description.
"RESULT_CODE" Integer The result code.
"REQUEST_CODE" Integer The request code being set upon sending the broadcast request.
Result Codes
Result Code Description
-1 Certified Log Pdf retrieved successfully.
2 Unknown error occurred while retrieving the pdf file.
80 Invalid date being set on "CL_DATE" parameter.
81 The log was not yet certified, unable to retrieve the pdf file.

Broadcast for every Log Certification

This intent will send a broadcast message being sent from HOS app every time a driver certifies his log.

Action Name
"com.vistracks.intent.action.LOGS_CERTIFIED"
Extras Data Type Description
"HOS_EXTRA_LOG_DATE" String The certified log date (ex: "2017-10-03")
"HOS_EXTRA_LOG_CERT_TIME" String The time when it was certified. (ex: "2016-09-02T02:33:56.152Z")

Broadcast for Disabling LockScreen

This will disabled lockscreen of HOS app via broadcast message.

Action Name
"com.vistracks.intent.action.HOS_SET_LOCKSCREEN_DISABLED"
Parameters
Extras Data Type Description
"HOS_EXTRA_DISABLE_LOCKSCREEN" Boolean Whether to disable or enable lockscreen
"REQUEST_CODE" Integer The request code.
Response
Action Name
"com.vistracks.intent.action.HOS_SET_LOCKSCREEN_DISABLED_RESULT"
Extras Data Type Description
"RESULT_DESC" String The result description.
"RESULT_CODE" Integer The result code.
"REQUEST_CODE" Integer The request code being set upon sending the broadcast request.
Result Codes
Result Code Description
-1 Successfully apply changes.
2 Unknown error occurred.

Broadcast for Vehicle Started Moving

This intent will send a broadcast message from HOS app every time a vehicle starts moving.

Action Name
"com.vistracks.intent.action.HOS_VEHICLE_STARTED_MOVING"
Extras Data Type Description
"HOS_EXTRA_HOS_DUTY_BEGIN" String The current duty start time. (ex: "2017-12-12T02:33:56.152Z")
"HOS_EXTRA_NEXT_VIOLATION_TIME" String The time of the next violation will occur. (ex: "2017-12-13T02:33:56.152Z")

Android Integration Tutorial

The pdf shows some sample code on how to integrate or launch component of our Hours of Service android application. You can do an experiment on your android application based from the pdf tutorial below. Access Hours Of Service Android Integration Guide

Sample Android Application

Clicking the button below will allow you to download a ".zip" file containing the sample android application. This application shows how to integrate our Hours of Service android application.