requestFullSpace
public suspend fun ComponentActivity.requestFullSpace(): SpaceRequestResult
Request that the system places the application into full space mode.
In full space, this application will be the only application in the visible space, its spatial capabilities will be expanded, and its physical bounds will expand to fill the entire virtual space.
This suspend function initiates an asynchronous OS-level space change and will resume with SpaceRequestResult.Success once the application has successfully entered full 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 full space, SpaceRequestResult.Unsupported if the device does not support XR spaces, or SpaceRequestResult.Error if a system error occurs. |