| CLASS info |
| public class ActivityIdentificationService |
| Interaction access point of activity identification. |
| Return type | Method name |
| Task<Void> | deleteActivityConversionUpdates(PendingIntent pendingIntent) |
| Task<Void> | deleteActivityIdentificationUpdates(PendingIntent callbackIntent) |
| Task<Void> | createActivityConversionUpdates(ActivityConversionRequest activityConversionRequest, PendingIntent pendingIntent) |
| Task<Void> | createActivityIdentificationUpdates(long intervalMillis, PendingIntent callbackIntent) |
Parameters
| Parameter name | Parameter desc |
| pendingIntent | pendingIntent associated with the activity conversion request to be removed. |
Return
| type | desc |
| Task<Void> | Task. You can add addOnSuccesslistener() and addOnFailureListener() to obtain the execution result of the current method, and add getStateCode() to check whether the execution is successful. |
| Method |
| public Task<Void> deleteActivityIdentificationUpdates(PendingIntent callbackIntent) |
| This API is used to remove all activity identification updates from the specified PendingIntent object. |
Parameters
| Parameter name | Parameter desc |
| callbackIntent | PendingIntent request to be removed. |
Return
| type | desc |
| Task<Void> | Task. You can add addOnSuccesslistener() and addOnFailureListener() to obtain the execution result of the current method, and add getStateCode() to check whether the execution is successful. |
| Method |
| public Task<Void> createActivityConversionUpdates(ActivityConversionRequest activityConversionRequest, PendingIntent pendingIntent) |
| This API is used to activity conversions (entering and exit), for example, detecting user status change from walking to bicycling.The Conversion API supports the following activity parameters. |
Parameters
| Parameter name | Parameter desc |
| activityConversionRequest | Activity conversion request |
| pendingIntent | PendingIntent parameter. When building a PendingIntent object, you need to set Class and Action. Do not build an empty Intent object. |
Return
| type | desc |
| Task<Void> | Task. You can add addOnSuccesslistener() and addOnFailureListener() to obtain the execution result of the current method, and add getStateCode() to check whether the execution is successful. |
| Method |
| public Task<Void> createActivityIdentificationUpdates(long intervalMillis, PendingIntent callbackIntent) |
| This API is used to register for activity identification updates. |
Parameters
| Parameter name | Parameter desc |
| intervalMillis | Interval for activity identification updates,in milliseconds. Larger values will result in fewer activity identifications. Smaller values will result in more activity identifications. |
| callbackIntent | PendingIntent to be updated. When building a PendingIntent object, you need to set Class and Action. Do not build an empty Intent object. |
Return
| type | desc |
| Task<Void> | Task. You can add addOnSuccesslistener() and addOnFailureListener() to obtain the execution result of the current method, and add getStateCode() to check whether the execution is successful. |