Sets the mime type for the external data track. This will be the MIME type set on the
additional stream created for thisTrack, another convenient means of identification,
particularly for applications that do not support UUID as a means of identification.
[[["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\u003eTrack\u003c/code\u003e objects are used for configuring and recording data during AR session recording.\u003c/p\u003e\n"],["\u003cp\u003eA new \u003ccode\u003eTrack\u003c/code\u003e is created with a session, and can be customized with an ID, metadata, and a mime type.\u003c/p\u003e\n"],["\u003cp\u003eTrack IDs are crucial for retrieving data during playback and should be set using \u003ccode\u003esetId()\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003esetMetadata()\u003c/code\u003e allows for adding arbitrary descriptive data to the track, while \u003ccode\u003esetMimeType()\u003c/code\u003e specifies the data type for external tracks.\u003c/p\u003e\n"]]],[],null,["# Track\n\n`\npublic class\n`**Track**`\n` \nConfiguration of a Track for recording data on session recording. \n\nPublic Constructors\n-------------------\n\n|-----|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` ` | [Track](/ar/reference/java/com/google/ar/core/Track#Track(com.google.ar.core.Session))`(`[Session](/ar/reference/java/com/google/ar/core/Session)` session)` Creates a new Track. |\n\nPublic Methods\n--------------\n\n|------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` `[Track](/ar/reference/java/com/google/ar/core/Track)` ` | [setId](/ar/reference/java/com/google/ar/core/Track#setId(java.util.UUID))`(`[UUID](https://developer.android.com/reference/java/util/UUID)` trackUuid)` Sets the ID of the track. |\n| ` `[Track](/ar/reference/java/com/google/ar/core/Track)` ` | [setMetadata](/ar/reference/java/com/google/ar/core/Track#setMetadata(java.nio.ByteBuffer))`(`[ByteBuffer](https://developer.android.com/reference/java/nio/ByteBuffer)` metadata)` Sets the track metadata. |\n| ` `[Track](/ar/reference/java/com/google/ar/core/Track)` ` | [setMimeType](/ar/reference/java/com/google/ar/core/Track#setMimeType(java.lang.String))`(`[String](https://developer.android.com/reference/java/lang/String)` mimeType)` Sets the mime type for the external data track. |\n\nInherited Methods\n-----------------\n\nFrom `class\njava.lang.Object` \n\n|---------------------------------------------------------------------------------|-------------------------------------------------------------------------------------|\n| ` `[Object](https://developer.android.com/reference/java/lang/Object)` ` | clone`()` |\n| ` boolean ` | equals`(`[Object](https://developer.android.com/reference/java/lang/Object)` arg0)` |\n| ` void ` | finalize`()` |\n| ` final `[Class](https://developer.android.com/reference/java/lang/Class)`\u003c?\u003e ` | getClass`()` |\n| ` int ` | hashCode`()` |\n| ` final void ` | notify`()` |\n| ` final void ` | notifyAll`()` |\n| ` `[String](https://developer.android.com/reference/java/lang/String)` ` | toString`()` |\n| ` final void ` | wait`(long arg0, int arg1)` |\n| ` final void ` | wait`(long arg0)` |\n| ` final void ` | wait`()` |\n\nPublic Constructors\n-------------------\n\n#### public\nTrack\n([Session](/ar/reference/java/com/google/ar/core/Session) session)\n\n### Track\n\n```java\npublic Track(\n Session session\n)\n``` \nCreates a new Track.\n\n| Details ||\n| Parameters | |-----------|---| | `session` | | |\n|------------|-------------------------------------|\n\nPublic Methods\n--------------\n\n#### public\n[Track](/ar/reference/java/com/google/ar/core/Track)\nsetId\n([UUID](https://developer.android.com/reference/java/util/UUID) trackUuid)\n\n### setId\n\n```java\npublic Track setId(\n UUID trackUuid\n)\n``` \nSets the ID of the track. This ID is required and will be the same ID used to retrieve data\nduring playback.\n\n| Details ||\n| Parameters | |-------------|---| | `trackUuid` | | |\n|------------|-----------------------------------------|\n\n#### public\n[Track](/ar/reference/java/com/google/ar/core/Track)\nsetMetadata\n([ByteBuffer](https://developer.android.com/reference/java/nio/ByteBuffer) metadata)\n\n### setMetadata\n\n```java\npublic Track setMetadata(\n ByteBuffer metadata\n)\n``` \nSets the track metadata. This is arbitrary data used to describe the track.\n\n| Details ||\n| Parameters | |------------|---| | `metadata` | | |\n|------------|---------------------------------------|\n\n#### public\n[Track](/ar/reference/java/com/google/ar/core/Track)\nsetMimeType\n([String](https://developer.android.com/reference/java/lang/String) mimeType)\n\n### setMimeType\n\n```java\npublic Track setMimeType(\n String mimeType\n)\n``` \nSets the mime type for the external data track. This will be the MIME type set on the\nadditional stream created for this [Track](/ar/reference/java/com/google/ar/core/Track), another convenient means of identification,\nparticularly for applications that do not support UUID as a means of identification.\n\n| Details ||\n| Parameters | |------------|---| | `mimeType` | | |\n|------------|---------------------------------------|"]]