Starting and Stopping LiveSight
It is important to make a distinction between the two operating modes provided by AndroidXCompositeFragment
, Map Mode, and LiveSight Mode. Map Mode is the mode of operation that is the same as that provided by AndroidXMapFragment
. As with AndroidXMapFragment
, Map Mode behavior and functionality are as described under Maps. LiveSight Mode is the mode of operation that provides the LiveSight experience and has separate functionality and behavior.
![]() | ![]() |
To switch between Map Mode and LiveSight Mode, two methods from the ARController
, start()
and stop()
, are used. The start()
method triggers the transition from Map Mode to LiveSight Mode, which includes a short cinematic transition animation by default. Calling start()
while already in LiveSight Mode results in Error.INVALID_OPERATION
error code being returned. Use the stop()
method to transition from LiveSight Mode to Map Mode. By default AndroidXCompositeFragment
starts in Map Mode.
// Triggers the transition from Map Mode to LiveSight Mode
Error error = arController.start();
...
// Exits LiveSight Mode and returns to Map Mode
Error error = arController.stop(true);
Reading the Current Pose
ARController
provides a convenient way to retrieve the current positional and directional (pose) values of your LiveSight session. By calling ARController.getPose()
you can retrieve the ARPoseReading
instance which contains the following values: - Heading
- Pitch
- Roll
- Latitude
- Longitude
- Altitude
- Timestamp
ARPoseReading
values are derived from device sensors, they are interpolated and smoothed by the LiveSight engine.