Jetpack XR용 ARCore를 사용하면 앱이 하위 수준 장면 이해 기본 요소와 동작 추적을 사용하여 증강 현실 (AR)의 기본 개념을 사용할 수 있습니다. AR 환경을 빌드할 때 평면 데이터를 사용하거나 공간의 고정된 위치에 콘텐츠를 고정해야 하는 경우 Jetpack XR용 ARCore를 사용하세요.
XR에 Jetpack Compose를 사용하는 경우 LocalSession를 사용하여 생성된 세션에 액세스합니다.
Session 구성
일부 기능은 기본적으로 사용 중지되어 있으며 작동하려면 구성해야 합니다. 세션을 구성하려면 configure()를 사용하고 Session에 필요한 구성 옵션을 지정합니다. 예를 들어 손 추적을 사용 설정하려면 HandTrackingMode이 HandTrackingMode.BOTH 모드로 설정됩니다.
valnewConfig=session.config.copy(handTracking=Config.HandTrackingMode.BOTH)when(valresult=session.configure(newConfig)){isSessionConfigureConfigurationNotSupported->
TODO(/* Some combinations of configurations are not valid. Handle this failure case. */)isSessionConfigureSuccess->TODO(/* Success! */)else->
TODO(/* A different unhandled exception was thrown. */)}
이 페이지에 나와 있는 콘텐츠와 코드 샘플에는 콘텐츠 라이선스에서 설명하는 라이선스가 적용됩니다. 자바 및 OpenJDK는 Oracle 및 Oracle 계열사의 상표 또는 등록 상표입니다.
최종 업데이트: 2025-08-23(UTC)
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["필요한 정보가 없음","missingTheInformationINeed","thumb-down"],["너무 복잡함/단계 수가 너무 많음","tooComplicatedTooManySteps","thumb-down"],["오래됨","outOfDate","thumb-down"],["번역 문제","translationIssue","thumb-down"],["샘플/코드 문제","samplesCodeIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-08-23(UTC)"],[],[],null,["# Work with ARCore for Jetpack XR\n\nARCore for Jetpack XR allows apps to work with basic concepts of augmented\nreality (AR), using low-level scene understanding primitives and motion\ntracking. Use ARCore for Jetpack XR when building AR experiences and you need to\nuse planar data or anchor content to a fixed location in space.\n| **Preview:** ARCore for Jetpack XR is currently only available on Android XR devices.\n\nAccess a `Session`\n------------------\n\nA `Session` must [be created](/develop/xr/jetpack-xr-sdk/add-session#access-session) when using ARCore for Jetpack XR.\n\nWhen using Jetpack Compose for XR, use [`LocalSession`](/reference/kotlin/androidx/xr/compose/platform/package-summary#LocalSession()) to access the session\nthat is created for you.\n\nConfigure a `Session`\n---------------------\n\nSome features may be disabled by default and must be configured in order to\nfunction. To configure a session, use `configure()` and specify [the\nconfiguration options](/reference/kotlin/androidx/xr/runtime/Config) that your `Session` needs. For example, to enable\n[hand tracking](/develop/xr/jetpack-xr-sdk/arcore/hands), the `HandTrackingMode` is set to the\n[`HandTrackingMode.BOTH`](/reference/kotlin/androidx/xr/runtime/Config.HandTrackingMode#BOTH()) mode:\n\n\n```kotlin\nval newConfig = session.config.copy(\n handTracking = Config.HandTrackingMode.BOTH\n)\nwhen (val result = session.configure(newConfig)) {\n is SessionConfigureConfigurationNotSupported -\u003e\n TODO(/* Some combinations of configurations are not valid. Handle this failure case. */)\n is SessionConfigureSuccess -\u003e TODO(/* Success! */)\n else -\u003e\n TODO(/* A different unhandled exception was thrown. */)\n}https://github.com/android/snippets/blob/dd30aee903e8c247786c064faab1a9ca8d10b46e/xr/src/main/java/com/example/xr/arcore/Hands.kt#L39-L48\n```\n\n\u003cbr /\u003e\n\nSee also\n--------\n\n- [Work with Anchors using ARCore for Jetpack XR](/develop/xr/jetpack-xr-sdk/arcore/anchors)\n- [Work with Planes using ARCore for Jetpack XR](/develop/xr/jetpack-xr-sdk/arcore/planes)\n- [Work with Hands using ARCore for Jetpack XR](/develop/xr/jetpack-xr-sdk/arcore/hands)"]]