DataItemAsset
Stay organized with collections
Save and categorize content based on your preferences.
Public Method Summary
abstract String
|
|
abstract String
|
getId
() Returns the Android Wear-wide unique identifier for a particular asset.
|
Inherited Method Summary
From interface
com.google.android.gms.common.data.Freezable
Public Methods
public abstract String
getDataItemKey
()
Returns the identifier used to address this asset in the context of an existing DataItem
.
public abstract String
getId
()
Returns the Android Wear-wide unique identifier for a particular asset.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License
, and code samples are licensed under the Apache 2.0 License
. For details, see the Google Developers Site Policies
. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-10-31 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 2024-10-31 UTC."],[[["\u003cp\u003e\u003ccode\u003eDataItemAsset\u003c/code\u003e provides a reference to an asset stored within a data item on Android Wear.\u003c/p\u003e\n"],["\u003cp\u003eIt's used with the \u003ccode\u003eDataApi\u003c/code\u003e to get file descriptors for these assets.\u003c/p\u003e\n"],["\u003cp\u003eEach \u003ccode\u003eDataItemAsset\u003c/code\u003e has a unique identifier accessible via \u003ccode\u003egetId()\u003c/code\u003e and a key to address it within a \u003ccode\u003eDataItem\u003c/code\u003e using \u003ccode\u003egetDataItemKey()\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eIt inherits methods from \u003ccode\u003eFreezable\u003c/code\u003e allowing it to be frozen (\u003ccode\u003efreeze()\u003c/code\u003e) and checked for data validity (\u003ccode\u003eisDataValid()\u003c/code\u003e).\u003c/p\u003e\n"]]],[],null,["# DataItemAsset\n\npublic interface **DataItemAsset** implements [Freezable](/android/reference/com/google/android/gms/common/data/Freezable)\\\u003c[DataItemAsset](/android/reference/com/google/android/gms/wearable/DataItemAsset)\\\u003e \nA reference to an asset stored in a data item. Used to fetch file descriptors using\n[DataApi.getFdForAsset(GoogleApiClient, DataItemAsset)](/android/reference/com/google/android/gms/wearable/DataApi#getFdForAsset(com.google.android.gms.common.api.GoogleApiClient,%20com.google.android.gms.wearable.DataItemAsset)). \n\n### Public Method Summary\n\n|----------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| abstract [String](//developer.android.com/reference/java/lang/String.html) | [getDataItemKey](/android/reference/com/google/android/gms/wearable/DataItemAsset#getDataItemKey())() Returns the identifier used to address this asset in the context of an existing [DataItem](/android/reference/com/google/android/gms/wearable/DataItem). |\n| abstract [String](//developer.android.com/reference/java/lang/String.html) | [getId](/android/reference/com/google/android/gms/wearable/DataItemAsset#getId())() Returns the Android Wear-wide unique identifier for a particular asset. |\n\n### Inherited Method Summary\n\nFrom interface com.google.android.gms.common.data.Freezable \n\n|--------------------------------------------------------------------------------------------|---------------|\n| abstract [DataItemAsset](/android/reference/com/google/android/gms/wearable/DataItemAsset) | freeze() |\n| abstract boolean | isDataValid() |\n\nPublic Methods\n--------------\n\n#### public abstract [String](//developer.android.com/reference/java/lang/String.html) **getDataItemKey** ()\n\nReturns the identifier used to address this asset in the context of an existing\n[DataItem](/android/reference/com/google/android/gms/wearable/DataItem). \n\n#### public abstract [String](//developer.android.com/reference/java/lang/String.html) **getId** ()\n\nReturns the Android Wear-wide unique identifier for a particular asset."]]