Nested classes |
class |
Subscription.Builder
Builder for Subscription
|
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
getAreaIds
public int[] getAreaIds ()
Gets all the areaIds added in the Subscription.Builder object. This will return an empty
array if no particular areaIds were added specifically, which means that the client wants to
subscribe to all possible area IDs.
Returns |
int[] |
The areaIds to subscribe to, empty array means subscribing to all area IDs. |
getPropertyId
public int getPropertyId ()
Gets the propertyId set in the Subscription.Builder object.
Returns |
int |
The propertyId to subscribe to |
getResolution
public float getResolution ()
Gets the resolution set in the Subscription.Builder object.
Returns |
float |
the resolution to subscribe to |
getUpdateRateHz
public float getUpdateRateHz ()
Gets the updateRateHz set in the Subscription.Builder object.
Returns |
float |
The update rate to subscribe to |
isVariableUpdateRateEnabled
public boolean isVariableUpdateRateEnabled ()
Gets the variable update rate enabled boolean set in the Subscription.Builder object.
Returns |
boolean |
whether variable update rate is enabled. |
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-17 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-17 UTC."],[],[],null,["# Subscription\n\nSummary: [Nested Classes](#nestedclasses) \\| [Methods](#pubmethods) \\| [Inherited Methods](#inhmethods) \n\nSubscription\n============\n\n\n`\npublic\n\nfinal\n\nclass\nSubscription\n`\n\n\n`\n\nextends Object\n\n\n`\n\n`\n\n\n`\n\n|---|--------------------------------------------|\n| java.lang.Object ||\n| ↳ | android.car.hardware.property.Subscription |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nRepresents the subscription data to [CarPropertyManager#subscribePropertyEvents](/reference/android/car/hardware/property/CarPropertyManager#subscribePropertyEvents(int,%20android.car.hardware.property.CarPropertyManager.CarPropertyEventCallback)). To\ncreate a Subscription use Subscription.Builder.\n\nSummary\n-------\n\n| ### Nested classes ||\n|----------|----------------------------------------------------------------------------------------------------------------|\n| ` class` | [Subscription.Builder](/reference/android/car/hardware/property/Subscription.Builder) Builder for Subscription |\n\n| ### Public methods ||\n|------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` int[]` | ` `[getAreaIds](/reference/android/car/hardware/property/Subscription#getAreaIds())`() ` Gets all the areaIds added in the Subscription.Builder object. |\n| ` int` | ` `[getPropertyId](/reference/android/car/hardware/property/Subscription#getPropertyId())`() ` Gets the propertyId set in the Subscription.Builder object. |\n| ` float` | ` `[getResolution](/reference/android/car/hardware/property/Subscription#getResolution())`() ` Gets the resolution set in the Subscription.Builder object. |\n| ` float` | ` `[getUpdateRateFast](/reference/android/car/hardware/property/Subscription#getUpdateRateFast())`() ` Gets the [CarPropertyManager#SENSOR_RATE_FAST](/reference/android/car/hardware/property/CarPropertyManager#SENSOR_RATE_FAST) which is 10hz. |\n| ` float` | ` `[getUpdateRateFastest](/reference/android/car/hardware/property/Subscription#getUpdateRateFastest())`() ` Gets the [CarPropertyManager#SENSOR_RATE_FASTEST](/reference/android/car/hardware/property/CarPropertyManager#SENSOR_RATE_FASTEST) which is 100hz. |\n| ` float` | ` `[getUpdateRateHz](/reference/android/car/hardware/property/Subscription#getUpdateRateHz())`() ` Gets the updateRateHz set in the Subscription.Builder object. |\n| ` float` | ` `[getUpdateRateNormal](/reference/android/car/hardware/property/Subscription#getUpdateRateNormal())`() ` Gets the [CarPropertyManager#SENSOR_RATE_NORMAL](/reference/android/car/hardware/property/CarPropertyManager#SENSOR_RATE_NORMAL) which is 1hz. |\n| ` float` | ` `[getUpdateRateUi](/reference/android/car/hardware/property/Subscription#getUpdateRateUi())`() ` Gets the [CarPropertyManager#SENSOR_RATE_UI](/reference/android/car/hardware/property/CarPropertyManager#SENSOR_RATE_UI) which is 5hz. |\n| ` boolean` | ` `[isVariableUpdateRateEnabled](/reference/android/car/hardware/property/Subscription#isVariableUpdateRateEnabled())`() ` Gets the variable update rate enabled boolean set in the Subscription.Builder object. |\n\n| ### Inherited methods |\n|-----------------------|---|\n| From class ` java.lang.Object ` |-------------------|-------------------------------| | ` Object` | ` clone() ` | | ` boolean` | ` equals(Object arg0) ` | | ` void` | ` finalize() ` | | ` final Class\u003c?\u003e` | ` 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() ` | ||\n\nPublic methods\n--------------\n\n### getAreaIds\n\n```\npublic int[] getAreaIds ()\n```\n\nGets all the areaIds added in the Subscription.Builder object. This will return an empty\narray if no particular areaIds were added specifically, which means that the client wants to\nsubscribe to all possible area IDs.\n\n\u003cbr /\u003e\n\n| Returns ||\n|---------|------------------------------------------------------------------------------------|\n| `int[]` | The areaIds to subscribe to, empty array means subscribing to all area IDs. \u003cbr /\u003e |\n\n### getPropertyId\n\n```\npublic int getPropertyId ()\n```\n\nGets the propertyId set in the Subscription.Builder object.\n\n\u003cbr /\u003e\n\n| Returns ||\n|-------|---------------------------------------|\n| `int` | The propertyId to subscribe to \u003cbr /\u003e |\n\n### getResolution\n\n```\npublic float getResolution ()\n```\n\nGets the resolution set in the Subscription.Builder object.\n\n\u003cbr /\u003e\n\n| Returns ||\n|---------|---------------------------------------|\n| `float` | the resolution to subscribe to \u003cbr /\u003e |\n\n### getUpdateRateFast\n\n```\npublic float getUpdateRateFast ()\n```\n\nGets the [CarPropertyManager#SENSOR_RATE_FAST](/reference/android/car/hardware/property/CarPropertyManager#SENSOR_RATE_FAST) which is 10hz.\n\n\u003cbr /\u003e\n\n| Returns ||\n|---------|----------------------------------------------------------------------------------------------------------------------------|\n| `float` | [CarPropertyManager#SENSOR_RATE_FAST](/reference/android/car/hardware/property/CarPropertyManager#SENSOR_RATE_FAST) \u003cbr /\u003e |\n\n### getUpdateRateFastest\n\n```\npublic float getUpdateRateFastest ()\n```\n\nGets the [CarPropertyManager#SENSOR_RATE_FASTEST](/reference/android/car/hardware/property/CarPropertyManager#SENSOR_RATE_FASTEST) which is 100hz.\n\n\u003cbr /\u003e\n\n| Returns ||\n|---------|----------------------------------------------------------------------------------------------------------------------------------|\n| `float` | [CarPropertyManager#SENSOR_RATE_FASTEST](/reference/android/car/hardware/property/CarPropertyManager#SENSOR_RATE_FASTEST) \u003cbr /\u003e |\n\n### getUpdateRateHz\n\n```\npublic float getUpdateRateHz ()\n```\n\nGets the updateRateHz set in the Subscription.Builder object.\n\n\u003cbr /\u003e\n\n| Returns ||\n|---------|----------------------------------------|\n| `float` | The update rate to subscribe to \u003cbr /\u003e |\n\n### getUpdateRateNormal\n\n```\npublic float getUpdateRateNormal ()\n```\n\nGets the [CarPropertyManager#SENSOR_RATE_NORMAL](/reference/android/car/hardware/property/CarPropertyManager#SENSOR_RATE_NORMAL) which is 1hz.\n\n\u003cbr /\u003e\n\n| Returns ||\n|---------|--------------------------------------------------------------------------------------------------------------------------------|\n| `float` | [CarPropertyManager#SENSOR_RATE_NORMAL](/reference/android/car/hardware/property/CarPropertyManager#SENSOR_RATE_NORMAL) \u003cbr /\u003e |\n\n### getUpdateRateUi\n\n```\npublic float getUpdateRateUi ()\n```\n\nGets the [CarPropertyManager#SENSOR_RATE_UI](/reference/android/car/hardware/property/CarPropertyManager#SENSOR_RATE_UI) which is 5hz.\n\n\u003cbr /\u003e\n\n| Returns ||\n|---------|------------------------------------------------------------------------------------------------------------------------|\n| `float` | [CarPropertyManager#SENSOR_RATE_UI](/reference/android/car/hardware/property/CarPropertyManager#SENSOR_RATE_UI) \u003cbr /\u003e |\n\n### isVariableUpdateRateEnabled\n\n```\npublic boolean isVariableUpdateRateEnabled ()\n```\n\nGets the variable update rate enabled boolean set in the Subscription.Builder object.\n\n\u003cbr /\u003e\n\n| Returns ||\n|-----------|-------------------------------------------------|\n| `boolean` | whether variable update rate is enabled. \u003cbr /\u003e |"]]