File tree Expand file tree Collapse file tree 3 files changed +9
-0
lines changed
xr/src/main/java/com/example/xr/arcore Expand file tree Collapse file tree 3 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ import androidx.xr.arcore.AnchorCreateSuccess
21
21
import androidx.xr.arcore.Trackable
22
22
import androidx.xr.runtime.Config
23
23
import androidx.xr.runtime.Session
24
+ import androidx.xr.runtime.SessionConfigureConfigurationNotSupported
24
25
import androidx.xr.runtime.SessionConfigureSuccess
25
26
import androidx.xr.runtime.math.Pose
26
27
import androidx.xr.scenecore.AnchorEntity
@@ -34,6 +35,8 @@ fun configureAnchoring(session: Session) {
34
35
)
35
36
when (val result = session.configure(newConfig)) {
36
37
is SessionConfigureSuccess -> TODO (/* Success! */ )
38
+ is SessionConfigureConfigurationNotSupported ->
39
+ TODO (/* Some combinations of configurations are not valid. Handle this failure case. */ )
37
40
else ->
38
41
TODO (/* The session could not be configured. See SessionConfigureResult for possible causes. */ )
39
42
}
Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ import androidx.xr.arcore.Hand
23
23
import androidx.xr.arcore.HandJointType
24
24
import androidx.xr.runtime.Config
25
25
import androidx.xr.runtime.Session
26
+ import androidx.xr.runtime.SessionConfigureConfigurationNotSupported
26
27
import androidx.xr.runtime.SessionConfigureSuccess
27
28
import androidx.xr.runtime.math.Pose
28
29
import androidx.xr.runtime.math.Quaternion
@@ -40,6 +41,8 @@ fun ComponentActivity.configureSession(session: Session) {
40
41
)
41
42
when (val result = session.configure(newConfig)) {
42
43
is SessionConfigureSuccess -> TODO (/* Success! */ )
44
+ is SessionConfigureConfigurationNotSupported ->
45
+ TODO (/* Some combinations of configurations are not valid. Handle this failure case. */ )
43
46
else ->
44
47
TODO (/* The session could not be configured. See SessionConfigureResult for possible causes. */ )
45
48
}
Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ package com.example.xr.arcore
19
19
import androidx.xr.arcore.Plane
20
20
import androidx.xr.runtime.Config
21
21
import androidx.xr.runtime.Session
22
+ import androidx.xr.runtime.SessionConfigureConfigurationNotSupported
22
23
import androidx.xr.runtime.SessionConfigureSuccess
23
24
import androidx.xr.runtime.math.Pose
24
25
import androidx.xr.runtime.math.Ray
@@ -31,6 +32,8 @@ fun configurePlaneTracking(session: Session) {
31
32
)
32
33
when (val result = session.configure(newConfig)) {
33
34
is SessionConfigureSuccess -> TODO (/* Success! */ )
35
+ is SessionConfigureConfigurationNotSupported ->
36
+ TODO (/* Some combinations of configurations are not valid. Handle this failure case. */ )
34
37
else ->
35
38
TODO (/* The session could not be configured. See SessionConfigureResult for possible causes. */ )
36
39
}
You can’t perform that action at this time.
0 commit comments