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
iOS

First, enable triggered trips on SENTConfig:

[config setIsTriggeredTrip: TRUE];
Android

First, enable triggered trips on SdkConfig:

SdkConfig config = new SdkConfig.Builder(APP_ID, SECRET, notification)
.setTriggeredTripsEnabled(true)
.build();

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
iOS
// Signature
- (void) setTripTimeOutListener: (void (^)(void)) tripDidTimeOut;
// Usage
[[SENTSDK sharedInstance] setTripTimeOutListener:tripTimeoutListener];
Android
sentianceSdk.setTripTimeoutListener(new TripTimeoutListener() {
@Override
public void onTripTimeout () {
}
});

‚Äč