SDK Android XR hiện đã có trong Bản dùng thử cho nhà phát triển. Chúng tôi rất mong nhận được ý kiến phản hồi của bạn! Hãy truy cập vào trang hỗ trợ của chúng tôi để liên hệ.
Nếu bạn đã có ứng dụng dành cho thiết bị di động hoặc màn hình lớn trên Android, thì SDK Jetpack XR sẽ mở rộng ứng dụng của bạn sang một chiều mới bằng cách tạo không gian cho các bố cục hiện có và nâng cao trải nghiệm của bạn bằng các mô hình 3D và môi trường sống động. Hãy xem nguyên tắc về chất lượng để biết các đề xuất của chúng tôi về việc tạo không gian cho ứng dụng Android hiện có.
SDK Jetpack XR bao gồm các thư viện sau. Các công cụ này cùng nhau cung cấp một bộ công cụ toàn diện để xây dựng trải nghiệm không gian phong phú và đa dạng, đồng thời được thiết kế để hoạt động liền mạch với nhau.
Jetpack Compose cho XR: Tự động tạo bố cục giao diện người dùng không gian tận dụng các tính năng không gian của Android XR.
Material Design cho XR: Xây dựng bằng các thành phần và bố cục Material thích ứng với XR.
Jetpack SceneCore: Tạo và thao tác với biểu đồ cảnh Android XR bằng nội dung 3D.
ARCore cho Jetpack XR: Đưa nội dung kỹ thuật số vào thế giới thực bằng các tính năng nhận thức.
Jetpack Compose cho XR
Với Jetpack Compose cho XR, bạn có thể sử dụng các khái niệm Compose quen thuộc như hàng và cột để tạo bố cục giao diện người dùng không gian trong XR, cho dù bạn đang chuyển một ứng dụng 2D hiện có sang XR hay tạo một ứng dụng XR mới từ đầu.
Thư viện này cung cấp các tiện ích có thể kết hợp trong không gian con, chẳng hạn như bảng điều khiển không gian và vệ tinh nhân tạo, cho phép bạn đặt giao diện người dùng Compose 2D hoặc giao diện người dùng dựa trên Khung hiển thị hiện có trong bố cục không gian.
Compose cho XR giới thiệu thành phần kết hợp không gian con Volume, cho phép bạn đặt các thực thể SceneCore, chẳng hạn như mô hình 3D, tương ứng với giao diện người dùng.
Thư viện Jetpack SceneCore cho phép bạn đặt và sắp xếp nội dung 3D, do các thực thể xác định, tương ứng với nhau và môi trường của bạn. Với SceneCore, bạn có thể:
Lấy cảm hứng từ thư viện ARCore hiện có, thư viện ARCore cho Jetpack XR cung cấp các tính năng để kết hợp nội dung kỹ thuật số với thế giới thực. Thư viện này bao gồm tính năng theo dõi chuyển động, neo cố định, kiểm thử lượt nhấn và xác định mặt phẳng bằng tính năng gắn nhãn ngữ nghĩa (ví dụ: sàn, tường và mặt bàn). Thư viện này tận dụng ngăn xếp nhận thức cơ bản do OpenXR cung cấp, đảm bảo khả năng tương thích với nhiều thiết bị và giúp ứng dụng thích ứng với tương lai.
Xin lưu ý rằng bản phát hành này là một phần của Bản dùng thử cho nhà phát triển và các API này vẫn đang trong quá trình phát triển. Hãy xem ghi chú phát hành để biết các vấn đề đã biết:
OpenXR™ và biểu trưng OpenXR là các nhãn hiệu thuộc sở hữu của The Khronos Group Inc. và được đăng ký dưới dạng nhãn hiệu ở Trung Quốc, Liên minh Châu Âu, Nhật Bản và Vương quốc Anh.
Nội dung và mã mẫu trên trang này phải tuân thủ các giấy phép như mô tả trong phần Giấy phép nội dung. Java và OpenJDK là nhãn hiệu hoặc nhãn hiệu đã đăng ký của Oracle và/hoặc đơn vị liên kết của Oracle.
Cập nhật lần gần đây nhất: 2025-07-26 UTC.
[[["Dễ hiểu","easyToUnderstand","thumb-up"],["Giúp tôi giải quyết được vấn đề","solvedMyProblem","thumb-up"],["Khác","otherUp","thumb-up"]],[["Thiếu thông tin tôi cần","missingTheInformationINeed","thumb-down"],["Quá phức tạp/quá nhiều bước","tooComplicatedTooManySteps","thumb-down"],["Đã lỗi thời","outOfDate","thumb-down"],["Vấn đề về bản dịch","translationIssue","thumb-down"],["Vấn đề về mẫu/mã","samplesCodeIssue","thumb-down"],["Khác","otherDown","thumb-down"]],["Cập nhật lần gần đây nhất: 2025-07-26 UTC."],[],[],null,["# Develop with the Jetpack XR SDK\n\nThe Jetpack XR SDK lets you build immersive XR experiences using modern tools\nlike [Kotlin](/develop/ui/compose/kotlin) and [Compose](/compose), as well as previous generation tools such as\nJava and [Views](/develop/ui/views/layout/declaring-layout). You can [spatialize your UI](/develop/xr/jetpack-xr-sdk/develop-ui), [load and render 3D\nmodels](/develop/xr/jetpack-xr-sdk/add-3d-models) and semantically understand the real world.\n\nIf you already have a mobile or large screen app on Android, Jetpack XR SDK\nextends your app into a new dimension by spatializing existing layouts and\nenhancing your experiences with 3D models and immersive environments. See our\n[quality guidelines](/docs/quality-guidelines/android-xr) for our recommendations on spatializing your existing\nAndroid app. \nAlas, your browser doesn't support HTML5 video. That's OK! You can still [download the\nvideo](/static/images/develop/xr/jetpack-xr-sdk/index/jetpack-xr-sdk.mp4) and watch it with a video player.\n\nThe Jetpack XR SDK consists of the following libraries. Together, they provide a\ncomprehensive toolkit for building rich and diverse [spatialized experiences](/design/ui/xr/guides/foundations)\nand are designed to work seamlessly with each other.\n\n- **Jetpack Compose for XR**: Declaratively build spatial UI layouts that take advantage of Android XR's spatial capabilities.\n- **Material Design for XR**: Build with Material components and layouts that adapt for XR.\n- **Jetpack SceneCore**: Build and manipulate the Android XR scene graph with 3D content.\n- **ARCore for Jetpack XR**: Bring digital content into the real world with perception capabilities.\n\nJetpack Compose for XR\n----------------------\n\nWith Jetpack Compose for XR, you can use familiar [Compose concepts](/develop/ui/compose/layouts/basics) such as\n[rows](/reference/kotlin/androidx/compose/foundation/layout/package-summary#Row(androidx.compose.ui.Modifier,androidx.compose.foundation.layout.Arrangement.Horizontal,androidx.compose.ui.Alignment.Vertical,kotlin.Function1)) and [columns](/reference/kotlin/androidx/compose/foundation/layout/package-summary#Column(androidx.compose.ui.Modifier,androidx.compose.foundation.layout.Arrangement.Vertical,androidx.compose.ui.Alignment.Horizontal,kotlin.Function1)(androidx.compose.ui.Modifier,androidx.compose.foundation.layout.Arrangement.Vertical,androidx.compose.ui.Alignment.Horizontal,kotlin.Function1)) to create spatial UI layouts in XR, whether you're\nporting an existing 2D app to XR or creating a new XR app from scratch.\n\nThis library provides subspace composable widgets, such as [spatial panels](/reference/kotlin/androidx/xr/compose/subspace/package-summary#SpatialPanel(android.content.Intent,androidx.xr.compose.subspace.layout.SubspaceModifier,androidx.xr.compose.subspace.layout.SpatialShape))\nand [orbiters](/reference/kotlin/androidx/xr/compose/spatial/package-summary#Orbiter(androidx.xr.compose.spatial.OrbiterEdge.Horizontal,androidx.compose.ui.unit.Dp,androidx.compose.ui.Alignment.Horizontal,androidx.xr.compose.spatial.OrbiterSettings,androidx.xr.compose.subspace.layout.SpatialShape,androidx.xr.compose.spatial.SpatialElevationLevel,kotlin.Function0)), which let you place your existing 2D Compose or Views-based\nUI in a spatial layout.\n\nSee [Develop UI with Jetpack Compose for XR](/develop/xr/jetpack-xr-sdk/develop-ui) for detailed guidance.\n\nCompose for XR introduces the [`Volume`](/reference/kotlin/androidx/xr/compose/subspace/package-summary#Volume(androidx.xr.compose.subspace.layout.SubspaceModifier,kotlin.Function1)) subspace composable, which lets you\nplace [SceneCore](/develop/xr/jetpack-xr-sdk#jetpack-scenecore) entities, such as 3D models, relative to your UI.\n\nLearn how to [spatialize your existing Android app](/develop/xr/jetpack-xr-sdk/add-xr-to-existing) or view the API\nreference for more detailed information.\n\nMaterial Design for XR\n----------------------\n\nMaterial Design provides components and layouts that adapt for XR. For example,\nif you're building with [adaptive layouts](/develop/ui/compose/layouts/adaptive) and you update to the latest\nalpha of the dependency using a [`EnableXrComponentOverrides`](/reference/kotlin/androidx/xr/compose/material3/package-summary#EnableXrComponentOverrides(androidx.xr.compose.material3.XrComponentOverrideEnabler,kotlin.Function0)) wrapper,\n[each pane](/develop/ui/compose/layouts/adaptive/canonical-layouts) is placed inside a [`SpatialPanel`](/reference/kotlin/androidx/xr/compose/subspace/package-summary#SpatialPanel(android.content.Intent,androidx.xr.compose.subspace.layout.SubspaceModifier,androidx.xr.compose.subspace.layout.SpatialShape)) and a [navigation\nrail](/reference/kotlin/androidx/compose/material3/package-summary#NavigationRail(androidx.compose.ui.Modifier,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,kotlin.Function1,androidx.compose.foundation.layout.WindowInsets,kotlin.Function1)) is placed in an [`Orbiter`](/reference/kotlin/androidx/xr/compose/spatial/package-summary#Orbiter(androidx.xr.compose.spatial.OrbiterEdge.Horizontal,androidx.compose.ui.unit.Dp,androidx.compose.ui.Alignment.Horizontal,androidx.xr.compose.spatial.OrbiterSettings,androidx.xr.compose.subspace.layout.SpatialShape,androidx.xr.compose.spatial.SpatialElevationLevel,kotlin.Function0)). [Learn more about implementing\nMaterial Design for XR](/develop/xr/jetpack-xr-sdk/material-design).\n\nJetpack SceneCore\n-----------------\n\nThe Jetpack SceneCore library lets you place and arrange 3D content, defined by\n[entities](/develop/xr/jetpack-xr-sdk/work-with-entities), relative to each other and your environment. With SceneCore, you\ncan:\n\n- Set [spatial environments](/design/ui/xr/guides/environments)\n- Create instances of a [`PanelEntity`](/reference/kotlin/androidx/xr/scenecore/PanelEntity)\n- [Place and animate 3D models](/develop/xr/jetpack-xr-sdk/add-3d-models)\n- [Specify spatial audio sources](/develop/xr/jetpack-xr-sdk/add-spatial-audio)\n- [Add Components to entities that make them movable, resizable, and can be\n anchored to the real world](/develop/xr/jetpack-xr-sdk/work-with-entities)\n\nThe Jetpack SceneCore library also provides support for spatializing\napplications built using Views. See our [guide to working with views](/develop/xr/jetpack-xr-sdk/develop-ui-views) for\nmore details.\n\nView the [API reference](/reference/kotlin/androidx/xr/scenecore/package-summary) for more detailed information.\n\nARCore for Jetpack XR\n---------------------\n\nInspired by the existing [ARCore library](https://developers.google.com/ar), the ARCore for\nJetpack XR library provides capabilities for blending digital content with the\nreal world. This library includes motion tracking, persistent anchors, hit\ntesting, and plane identification with semantic labeling (for example, floor,\nwalls, and tabletops). This library leverages the underlying perception stack\npowered by [OpenXR](/develop/xr/openxr), which ensures compatibility with a wide range of\ndevices and helping to future-proof apps.\n\nView [Work with ARCore for Jetpack XR](/develop/xr/jetpack-xr-sdk/work-with-arcore) for more detailed information.\n| **Preview:** Unlike its predecessor, ARCore for Jetpack XR currently only supports Android XR.\n\nNote on Developer Preview\n-------------------------\n\nPlease note that this release is part of a Developer Preview and these APIs are\nstill under development. See the release notes for known issues:\n\n- [Jetpack Compose for XR Release Notes](/jetpack/androidx/releases/xr-compose)\n- [ARCore for Jetpack XR Release Notes](/jetpack/androidx/releases/xr-arcore)\n- [Jetpack SceneCore Release Notes](/jetpack/androidx/releases/xr-scenecore)\n- [Jetpack for SceneCore Runtime Release Notes](/jetpack/androidx/releases/xr-runtime)\n\nIf you run into an issue that is not on that list, [please report a bug or\nsubmit feedback](/develop/xr/support).\n\n*** ** * ** ***\n\nOpenXR™ and the OpenXR logo are trademarks owned\nby The Khronos Group Inc. and are registered as a trademark in China,\nthe European Union, Japan and the United Kingdom."]]