ProviderUpdateRequester

public class ProviderUpdateRequester
extends Object

java.lang.Object
   ↳ android.support.wearable.complications.ProviderUpdateRequester


Allows complication providers to request update calls from the system. This effectively allows providers to push updates to the system outside of the update request cycle.

Summary

Public constructors

ProviderUpdateRequester(Context context, ComponentName providerComponent)

Public methods

void requestUpdate(int... complicationIds)

Requests that the system call onComplicationUpdate on the specified provider, for the given complication ids.

void requestUpdateAll()

Requests that the system call onComplicationUpdate on the specified provider, for all active complications using that provider.

Inherited methods

From class java.lang.Object

Public constructors

ProviderUpdateRequester

ProviderUpdateRequester (Context context, 
                ComponentName providerComponent)

Parameters
providerComponent ComponentName: the component name of the ComplicationProviderService that this will request updates for

Public methods

requestUpdate

void requestUpdate (int... complicationIds)

Requests that the system call onComplicationUpdate on the specified provider, for the given complication ids.

This will only work if the complications are active and the specified provider is the one configured for those complications.

This will also only work if called from the same package as the provider.

Parameters
complicationIds int: the ids of the complications to be updated, as provided in calls to onComplicationActivated and onComplicationUpdate.

requestUpdateAll

void requestUpdateAll ()

Requests that the system call onComplicationUpdate on the specified provider, for all active complications using that provider.

This will do nothing if no active complications are configured to use the specified provider.

This will also only work if called from the same package as the provider.