Search…
Controlled Trips Only
a.k.a Triggered trips
The default SDK detection mode is set to automatic detections. You can change this behavior and have the SDK record trips only when instructed to do so.
iOS
Android
First, enable triggered trips on SENTConfig:
1
[config setIsTriggeredTrip: TRUE];
Copied!
First, enable triggered trips on SdkConfig:
1
SdkConfig config = new SdkConfig.Builder(APP_ID, SECRET, notification)
2
.setTriggeredTripsEnabled(true)
3
.build();
Copied!
Having done so, you've disabled automatic detection on the SDK. You can now control when trips are recorded by calling startTrip and stopTrip as described in this section.

Trip Timeout

In triggered trips mode, the SDK sets timeouts to automatically end trips that have been running for a long period. The duration of this timeout is 2 hours by default, but we can adjust it for your app based on your use case.
To handle trip timeouts, set a listener on the SDK instance:
iOS
Android
1
// Signature
2
- (void) setTripTimeOutListener: (void (^)(void)) tripDidTimeOut;
3
// Usage
4
[[SENTSDK sharedInstance] setTripTimeOutListener:tripTimeoutListener];
Copied!
1
sentianceSdk.setTripTimeoutListener(new TripTimeoutListener() {
2
@Override
3
public void onTripTimeout () {
4
}
5
});
Copied!
Copy link
Contents
Trip Timeout