| CLASS info |
| public class ActivityIdentificationService |
| 活动识别交互接入点。 |
| 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 | 待移除的活动转换请求关联 |
Return
| type | desc |
| Task<Void> | 任务。给它添加监听器,获取当前方法执行结果,通过getStatusCode()以确定是否成功。 |
| Method |
| public Task<Void> deleteActivityIdentificationUpdates(PendingIntent callbackIntent) |
| 移除指定PendingIntent的所有活动识别更新。 |
Parameters
| Parameter name | Parameter desc |
| callbackIntent | 待移除的PendingIntent请求 |
Return
| type | desc |
| Task<Void> | 任务。给它添加监听器,获取当前方法执行结果,通过getStatusCode()以确定是否成功。 |
| Method |
| public Task<Void> createActivityConversionUpdates(ActivityConversionRequest activityConversionRequest, PendingIntent pendingIntent) |
| 接口提供检测活动转换条件(进入,退出)的功能,例如需要检测用户从走路变为骑自行车的状态等。 |
Parameters
| Parameter name | Parameter desc |
| activityConversionRequest | 活动转换请求 |
| pendingIntent | PendingIntent参数,构造PendingIntent时需设置Class、Action,不能构造空Intent。 |
Return
| type | desc |
| Task<Void> | 任务。给它添加监听器,获取当前方法执行结果,通过getStatusCode()以确定是否成功。 |
| Method |
| public Task<Void> createActivityIdentificationUpdates(long intervalMillis,PendingIntent callbackIntent) |
| 注册活动识别更新。 |
Parameters
| Parameter name | Parameter desc |
| intervalMillis | 活动检测更新间隔,以毫秒为单位,值越大,活动检测越少,值越小,活动检测越频繁。 |
| callbackIntent | 待更新的PendingIntent,构造PendingIntent时需设置Class、Action,不能构造空Intent。 |
Return
| type | desc |
| Task<Void> | 任务。给它添加监听器,获取当前方法执行结果,通过getStatusCode()以确定是否成功。 |