Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/software/guides/drive-addins.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ Inside the Geotab Drive app, we provide the same _api_ and _state_ properties fo
| api.mobile.speak() | If `api.mobile.exists()`, uses the text to speech functionality on the mobile device | String | Void |
| api.mobile.notify() | If `api.mobile.exists()`, will add a notification to the top bar of a native operating system Example: `api.mobile.notify("Fill up your vehicle", "Low on gas")` | String[Message], String[Title], String[Id], [String[JsonData]], [Boolean[Permanent]] | Void |
| api.mobile.geolocation | A navigator object that is similar to HTML5 `navigator.geolocation` Example: `api.mobile.geolocation.getCurrentPosition(function (position) { }, function (error) { }, { enableHighAccuracy: true })` | None | None |
| api.mobile.navigate() | If `api.mobile.exists()`, allows navigation from addin/host application to another page using the respective hash URL of the page. Example: `api.mobile.navigate(“hos”)` | String[URL] | Void |
| api.mobile.listenTo() | If `api.mobile.exists()`, it currently allows you to listen to events generated by the Geotab Drive application, and use a callback function to be notified with the incoming data. It returns a function that, when called, will turn this listener off. Currently, only incoming GPS data is sent (obtained from both IOX-USB data and mobile GPS data). Example: `api.mobile.listenTo(GpsData, callback)` | String[EventName] (Valid values for EventName: GpsData), Function[Callback] | Function[Void] |
| state.device | Get the current vehicle that is being connected to the mobile device | None | String |
| state.driving | Mobile device is detected as driving with the current vehicle | None | Boolean |
| state.charging | Mobile device is being powered | None | Boolean |
Expand Down