Skip to content

Drive motion config delegate

TNDriveMotionConfigDelegate is a protocol for users to receive trip changes through delegate methods.

Implement TNDriveMotionConfigDelegate protocol in a class

For how to configure the implementation class of TNDriveMotionConfigDelegate, please refer to Initialize the SDK. And no matter whether TNDriveDetectionMode is .auto or .manual, the application can provide dynamic configurations through this protocol.

1
2
3
4
5
6
7
8
    class DriveMotionConfigDelegate: TNDriveMotionConfigDelegate {

        // provide time range to DriveMotion SDK for reprocessing past unmatched trips
        func getReprocessTripTimeRange() -> TelenavDriveMotionAPI.TNTimeRange? {

        }

    }
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
    @interface DriveMotionConfigDelegate () <TNDriveMotionConfigDelegate>

    ...

    @implementation

    ...

    // provide time range to DriveMotion SDK for reprocessing past unmatched trips
    - (TelenavDriveMotionAPI.TNTimeRange *)getReprocessTripTimeRange:() {

    }