PassiveListenerCallback
public interface PassiveListenerCallback
A callback for receiving passive monitoring updates.
Summary
Public methods |
|
|---|---|
default void |
onGoalCompleted(@NonNull PassiveGoal goal)Called when a |
default void |
onHealthEventReceived(@NonNull HealthEvent event)Called when a |
default void |
onNewDataPointsReceived(@NonNull DataPointContainer dataPoints)Called when new |
default void |
Called when the client has lost permission for the passive listener request. |
default void |
Called when this callback has been successfully registered with Health Services. |
default void |
onRegistrationFailed(@NonNull Throwable throwable)Called when Health Services reports a failure with the registration of this callback. |
default void |
Called when new |
Public methods
onGoalCompleted
default void onGoalCompleted(@NonNull PassiveGoal goal)
Called when a PassiveGoal has been completed.
| Parameters | |
|---|---|
@NonNull PassiveGoal goal |
the |
onHealthEventReceived
default void onHealthEventReceived(@NonNull HealthEvent event)
Called when a HealthEvent has been detected.
| Parameters | |
|---|---|
@NonNull HealthEvent event |
the |
onNewDataPointsReceived
default void onNewDataPointsReceived(@NonNull DataPointContainer dataPoints)
Called when new DataPoints are generated.
| Parameters | |
|---|---|
@NonNull DataPointContainer dataPoints |
a list of new |
onPermissionLost
default void onPermissionLost()
Called when the client has lost permission for the passive listener request. If this happens, WHS will automatically unregister the client request and stop the relevant sensors. The client can use this callback to detect the problem and either prompt the user to re-grant the permissions or re-register while requesting only that which the app does have permission for.
onRegistered
default void onRegistered()
Called when this callback has been successfully registered with Health Services.
onRegistrationFailed
default void onRegistrationFailed(@NonNull Throwable throwable)
Called when Health Services reports a failure with the registration of this callback.
onUserActivityInfoReceived
default void onUserActivityInfoReceived(@NonNull UserActivityInfo info)
Called when new UserActivityInfo is generated.
| Parameters | |
|---|---|
@NonNull UserActivityInfo info |
a new |