requestHomeSpace
public suspend fun ComponentActivity.requestHomeSpace(): SpaceRequestResult
Request that the system places the application into home space mode.
In home space, the visible space may be shared with other applications; however, applications in home space will have their spatial capabilities and physical bounds limited.
This suspend function initiates an asynchronous OS-level space change and will resume with SpaceRequestResult.Success once the application has successfully entered home space. If the device does not support XR spaces, it will resume immediately with SpaceRequestResult.Unsupported.
Note: Because Full Space Mode and Home Space Mode changes are OS-level system changes, the space switch cannot be aborted mid-flight once initiated. Cancelling this coroutine unregisters the bounds listener but does not interrupt the ongoing space change. If requestFullSpace or requestHomeSpace is called again before this request completes, the coroutine suspended on this call will be cancelled with a CancellationException.
See modes in XR.
Returns
| SpaceRequestResult.Success if the application successfully enters home space, SpaceRequestResult.Unsupported if the device does not support XR spaces, or SpaceRequestResult.Error if a system error occurs. |