DriveMotionUsersClient
DriveMotion supports switching user opt in status through method calls optInRequest or optOutRequest when DriveMotionSettings.withOptInRequired(isOptInRequired) is set to true. To use this feature, developers must obtain DriveMotionUsersClient after initializing DriveMotion.
Get DriveMotionUsersClient
1 2 3 4 5 | |
1 2 3 4 5 | |
Use DriveMotionUsersClient
DriveMotionUsersClient 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 | |
Implement Callback
Callback is an interface, and developers need to specify its response type. It provides two callback entries for success and failure.
1 2 3 4 5 6 7 8 9 10 11 12 | |
1 2 3 4 5 6 7 8 9 | |
Opt In Request
The optInRequest method will let user opt in when isOptInRequired is true.
Build Request
1 | |
1 | |
Implement Callback
Callback is an interface, and developers need to specify its response type. It provides two callback entries for success and failure.
1 2 3 4 5 6 7 8 9 10 11 12 | |
1 2 3 4 5 6 7 8 9 | |
Opt Out Request
The optOutRequest method will let user opt out when isOptInRequired is true.
Build Request
1 | |
1 | |
Implement Callback
Callback is an interface, and developers need to specify its response type. It provides two callback entries for success and failure.
1 2 3 4 5 6 7 8 9 10 11 12 | |
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 | |
1 | |
Implement Callback
Callback is an interface, and developers need to specify its response type. It provides two callback entries for success and failure.
1 2 3 4 5 6 7 8 9 10 11 12 | |
1 2 3 4 5 6 7 8 9 | |