This example shows how to integrate Sygic Driving library.
- Open project in Android studio.
- Synchronize gradle project.
- In
local.properties
file set the license tosygic.license
key. To get license key, please contact our support. - If you want to be able to see your trips on maps, add your Google Maps API key to
google.maps.key
inlocal.properties
. - Run the app.
The best way to test the app is to drive a vehicle.
To update library version in your project from 1.x to 2.x follow these steps:
- Update driving library version in your build.gradle to latest version.
initialize
method signature was changed. It is no longer asynchronous, so the result of initialization is returned immediately.- Sygic license key must be provided in
initialize
method. To get your license key, please contact our support. - If you are using Driving library together with Sygic Maps SDK, you have to use single instance of Sygic
Auth
object. For Driving library this means you have to passSygicAuthConfig.UseExternalAuth(authInstance)
toinitialize
method. - Some constants like
DetectorState
andTripState
were changed to enums. - Some method overloads (e.g.
onTripUploaded
) were removed. double
timestamps were replaced byDate
,GpsPosition
was replaced byLocation
.TripValidityCriteria
can be set to discard trips that are too short. Default criterias are set to 90 seconds duration and 400 meters length. When trip is discarded,onTripDiscarded
event is fired (instead ofonTripFinished
). Discarded trips are not sent to server and are automatically deleted.- Please refer to changelog for other changes.