Discussions
Flutter SDK - addFutureTrackTag method on iOS does not work
Hi,
I am trying to call the addFutureTrackTag method using the Flutter SDK, like this:
```
await TrackingApi().addFutureTrackTag(tag: tag, source: source);
```
This works perfectly in Android, but throws an error in iOS which crashes the app:
```
telematics_sdk/SwiftTelematicsSDKPlugin.swift:210: Fatal error: Unexpectedly found nil while unwrapping an Optional value
```
I noticed in the SwiftTelematicsSDKPlugin.swif (https://github.com/Mobile-Telematics/telematicsSDK-demoapp-flutter-/blob/main/ios/Classes/SwiftTelematicsSDKPlugin.swift) handle function, "addFutureTrackTag" is mapped to the addTrackTags method. Is this intentional? To me, it seems incorrect.
lines 63 and 63:
```
....
case "addFutureTrackTag":
addTrackTags(call, result)
....
```
I think this needs to be:
```
....
case "addFutureTrackTag":
addFutureTrackTag(call, result)
....
```
Posted by Sam Helman about 2 years ago
Trips started in quick succession get merged in the dashboard.
Hi,
I am encountering an issue with the flutter sdk. Trips that are taken in quick succession are sometimes merged in to a single trip.
We are using the manual tracking method.
In our app we click a button to start the trip, which triggers the following event:
```
on<StartShuttleEvent>((event, emit) async {
...
// ENABLE SDK AND BEGIN TELEMATICS TRACKING
TrackingApi trackingApi = TrackingApi();
trackingApi.setDeviceID(deviceId: deviceToken);
trackingApi.setEnableSdk(enable: true);
trackingApi.startTracking();
...
}
```
We click a button to end the trip, triggering the end trip event:
```
on<EndShuttleEvent>((event, emit) async {
// END TELEMATICS TRACKING
TrackingApi().stopTracking();
// DISABLE SDK
TrackingApi().setEnableSdk(
enable: false,
uploadBeforeDisabling: true,
);
...
}
```
If, after I end the first trip, I start the second trip within a short period, the second trip will be merged with the first. For example:
- The trip with trackId = 13538592 was considered one trip, when we expected it to be two.
- The trip with trackId = 13580467 was considered one trip, when we expected it to be three.
My first guess was that the first trip was not being uploaded before the second trip was being started which was causing the trips to be merged. I am not sure how the tracking is actually implemented though to verify.
I wondered if you could provide any input on why this might be happening?
Thank you.
Posted by Sam Helman over 2 years ago
Where I can find a trackID or tracktoken
Some API methods require TripID or TripToken. where can I find it?
Posted by Matthew Davis almost 2 years ago
Driving events
Hello i need to know the deference between Acceleration and speeding in the app please
Posted by Matthew Davis over 2 years ago
What is identified as a 'track' in the raw telematic data?
What is identified as a 'track' in the raw telematic data?
Posted by Matthew Davis almost 2 years ago
What is vehicle 'angle'?
What is vehicle 'angle'?
Posted by Matthew Davis almost 2 years ago
Driving behaviour tracking and APIs
As I was going through the API, i could not figure out how a user's driving behaviour can be monitored? Is there a api that we have to call to tell SDK that the trip has started or it does that automatically?
Posted by Matthew Davis over 2 years ago
When capturing a Track, how is the StartDate and EndDate determined?
When capturing a Track, how is the StartDate and EndDate determined?
Posted by Matthew Davis almost 2 years ago
API to deactive user (but not delete)
Hi, I am unable to find the API call in the documentation to deactivate a user (but not delete them). This is something you can do in the Hub.
Posted by Daniel Lajeunesse about 2 years ago
How to modify driver scoring settings?
Hi,
I am using the SDK for a driving school customer. I would like to play around with the driver scoring settings (thresholds for acceleration, speeding, braking etc.) and modify them for the company I am working with. How do I do that? The documentation is a bit unclear.
Thanks,
Harsh.
Posted by Harsh over 1 year ago