TNDriveMotionClient
@objc
public protocol TNDriveMotionClient : NSObjectProtocol
In applications that use DriveMotionSDK, TNDriveMotionClient is the only way to use DriveMotion to expose capabilities. To get TNDriveMotionClient instance, use {@link TNDriveMotionService#getDriveMotionClient()} .
-
Only effective in manual mode, used to start a trip
@throws TNDriveMotionException If drive detection mode is set to
auto
.Declaration
Swift
@available(*, deprecated, message: "Using async startDriveRequest(﹚ instead.") func startDrive() throws
-
Create request in type of
TNStartDriveRequest
Declaration
Swift
func startDriveRequest() -> TNStartDriveRequestBuilder
Return Value
-
Only effective in manual mode, used to stop a trip
@throws TNDriveMotionException If drive detection mode is set to
auto
.Declaration
Swift
@available(*, deprecated, message: "Using async stopDriveRequest(﹚ instead.") func stopDrive() throws
-
Create request in type of
TNStopDriveRequest
Declaration
Swift
func stopDriveRequest() -> TNStopDriveRequestBuilder
Return Value
-
Create request in type of
TNStartDriveDetectionRequest
Declaration
Swift
func startDriveDetectionRequest() -> TNStartDriveDetectionRequestBuilder
Return Value
-
Create request in type of
TNStopDriveDetectionRequest
Declaration
Swift
func stopDriveDetectionRequest() -> TNStopDriveDetectionRequestBuilder
Return Value
-
Create request in type of
TNGetDriveDetectionStateRequest
Declaration
Swift
func getDriveDetectionStateRequest() -> TNGetDriveDetectionStateRequestBuilder
Return Value