DriveMotionUsersClient
DriveMotion supports switching user opt in status through method calls optInRequest or optOutRequest when DriveMotionSettings.optInRequired is set to true. To use this feature, developers must obtain DriveMotionUsersClient after initializing DriveMotion.
Get TNDriveMotionUsersClient
1 2 3 4 5 | |
1 2 3 4 5 | |
Use TNDriveMotionUsersClient
TNDriveMotionUsersClient provides the entrance to get user profiles, opt in, opt out, and delete user account.
Get User Profile Request
The getUserProfileRequest method will retrieve and update current user profile from cloud service if any of userAlias, userState, or userConsent is changed.
Build Request
1 | |
1 | |
Create a Call and execute it
Callback is a closure accepting response and error parameters.
1 2 3 4 5 6 7 8 9 | |
1 2 3 4 5 6 7 8 9 | |
Opt In Request
The optInRequest method will let user opt in when TNDriveMotionSettings.optInRequired is true.
Build Request
1 2 3 4 5 | |
1 2 3 4 5 | |
Create a Call and execute it
Callback is a closure accepting response and error parameters.
1 2 3 4 5 6 7 8 9 | |
1 2 3 4 5 6 7 8 9 | |
Opt Out Request
The optOutRequest method will let user opt out when TNDriveMotionSettings.optInRequired is true.
Build Request
1 2 3 4 5 | |
1 2 3 4 5 | |
Create a Call and execute it
Callback is a closure accepting response and error parameters.
1 2 3 4 5 6 7 8 9 | |
1 2 3 4 5 6 7 8 9 | |
Delete Account And Data Request
The deleteAccountAndDataRequest method will delete user account and trip data.
Build Request
1 2 3 4 5 | |
1 2 3 4 5 | |
Create a Call and execute it
Callback is a closure accepting response and error parameters.
1 2 3 4 5 6 7 8 9 | |
1 2 3 4 5 6 7 8 9 | |