Stay organized with collections
Save and categorize content based on your preferences.
ComplicationManager
public
class
ComplicationManager
extends Object
This class is deprecated.
use the Jetpack Wear
Watch Face libraries instead.
Allows providers to interact with the complications system.
Providers will receive an instance of this class in calls to onComplicationActivated
and onComplicationUpdate
.
Summary
Inherited methods |
From class
java.lang.Object
Object
|
clone()
|
boolean
|
equals(Object arg0)
|
void
|
finalize()
|
final
Class<?>
|
getClass()
|
int
|
hashCode()
|
final
void
|
notify()
|
final
void
|
notifyAll()
|
String
|
toString()
|
final
void
|
wait(long arg0, int arg1)
|
final
void
|
wait(long arg0)
|
final
void
|
wait()
|
|
Public methods
noUpdateRequired
public void noUpdateRequired (int complicationId)
Informs the system that no update is required after an update request. This means that the
complication will continue to display the previous value, which may be TYPE_NO_DATA if no data
has ever been sent.
A provider service should always call either this method or updateComplicationData(int, ComplicationData)
in response to an update request from the system.
Parameters |
complicationId |
int |
updateComplicationData
public void updateComplicationData (int complicationId,
ComplicationData data)
Updates complication data for the given complicationId
. The type of data provided must
either match the configured type for the given complication, or should be of TYPE_NO_DATA
.
If no update is required (meaning that the complication will continue to display the
previous value, which may be TYPE_NO_DATA if no data has ever been sent), then null may be
passed as the data (noUpdateRequired(int)
may be called to have the same effect).
A provider service should always call either this method or noUpdateRequired(int)
in
response to an update request from the system.
Parameters |
complicationId |
int |
data |
ComplicationData |
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[null,null,["Last updated 2025-02-10 UTC."],[],[],null,["# ComplicationManager\n\nSummary: [Methods](#pubmethods) \\| [Inherited Methods](#inhmethods) \n\nComplicationManager\n===================\n\n\n`\npublic\n\n\nclass\nComplicationManager\n`\n\n\n`\n\nextends `[Object](http://developer.android.com/reference/java/lang/Object.html)`\n\n\n`\n\n`\n\n\n`\n\n|---|------------------------------------------------------------|\n| [java.lang.Object](http://developer.android.com/reference/java/lang/Object.html) ||\n| ↳ | android.support.wearable.complications.ComplicationManager |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\n\n**This class is deprecated.** \n\nuse the [Jetpack Wear\nWatch Face](../../../../../jetpack/androidx/releases/wear-watchface) libraries instead.\n\nAllows providers to interact with the complications system.\n\nProviders will receive an instance of this class in calls to [onComplicationActivated](../../../../../reference/android/support/wearable/complications/ComplicationProviderService.html#onComplicationActivated(int,%20int,%20android.support.wearable.complications.ComplicationManager)) and [onComplicationUpdate](../../../../../reference/android/support/wearable/complications/ComplicationProviderService.html#onComplicationUpdate(int,%20int,%20android.support.wearable.complications.ComplicationManager)).\n\nSummary\n-------\n\n| ### Public methods ||\n|---------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` void` | ` `[noUpdateRequired](../../../../../reference/android/support/wearable/complications/ComplicationManager.html#noUpdateRequired(int))`(int complicationId) ` Informs the system that no update is required after an update request. |\n| ` void` | ` `[updateComplicationData](../../../../../reference/android/support/wearable/complications/ComplicationManager.html#updateComplicationData(int,%20android.support.wearable.complications.ComplicationData))`(int complicationId, `[ComplicationData](../../../../../reference/android/support/wearable/complications/ComplicationData.html)` data) ` Updates complication data for the given `complicationId`. |\n\n| ### Inherited methods |\n|-----------------------|---|\n| From class ` `[java.lang.Object](http://developer.android.com/reference/java/lang/Object.html)` ` |------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------| | ` `[Object](http://developer.android.com/reference/java/lang/Object.html) | ` clone() ` | | ` boolean` | ` equals(`[Object](http://developer.android.com/reference/java/lang/Object.html)` arg0) ` | | ` void` | ` finalize() ` | | ` final `[Class](http://developer.android.com/reference/java/lang/Class.html)`\u003c?\u003e` | ` getClass() ` | | ` int` | ` hashCode() ` | | ` final void` | ` notify() ` | | ` final void` | ` notifyAll() ` | | ` `[String](http://developer.android.com/reference/java/lang/String.html) | ` toString() ` | | ` final void` | ` wait(long arg0, int arg1) ` | | ` final void` | ` wait(long arg0) ` | | ` final void` | ` wait() ` | ||\n\nPublic methods\n--------------\n\n### noUpdateRequired\n\n```\npublic void noUpdateRequired (int complicationId)\n```\n\nInforms the system that no update is required after an update request. This means that the\ncomplication will continue to display the previous value, which may be TYPE_NO_DATA if no data\nhas ever been sent.\n\nA provider service should always call either this method or [updateComplicationData(int, ComplicationData)](../../../../../reference/android/support/wearable/complications/ComplicationManager.html#updateComplicationData(int,%20android.support.wearable.complications.ComplicationData))\nin response to an update request from the system.\n\n\u003cbr /\u003e\n\n| Parameters ||\n|------------------|--------------|\n| `complicationId` | `int` \u003cbr /\u003e |\n\n### updateComplicationData\n\n```\npublic void updateComplicationData (int complicationId, \n ComplicationData data)\n```\n\nUpdates complication data for the given `complicationId`. The type of data provided must\neither match the configured type for the given complication, or should be of [TYPE_NO_DATA](../../../../../reference/android/support/wearable/complications/ComplicationData.html#TYPE_NO_DATA).\n\nIf no update is required (meaning that the complication will continue to display the\nprevious value, which may be TYPE_NO_DATA if no data has ever been sent), then null may be\npassed as the data ([noUpdateRequired(int)](../../../../../reference/android/support/wearable/complications/ComplicationManager.html#noUpdateRequired(int)) may be called to have the same effect).\n\nA provider service should always call either this method or [noUpdateRequired(int)](../../../../../reference/android/support/wearable/complications/ComplicationManager.html#noUpdateRequired(int)) in\nresponse to an update request from the system.\n\n\u003cbr /\u003e\n\n| Parameters ||\n|------------------|---------------------------|\n| `complicationId` | `int` \u003cbr /\u003e |\n| `data` | `ComplicationData` \u003cbr /\u003e |"]]