Skip to main content
←API Reference

helpers


Classes​

NameTypeSummary
LocationHelperLocationHelper
Subscribes to GPS updates via the Fused Location Provider and notifies an [OnUpdateListener]
on each new fix. Used internally by [DefaultSessionDataSource].
SensorHelperSensorHelper
Reads compass (heading) and raw magnetometer data from Android sensors and exposes it as a
[Compass] snapshot. Used internally by [DefaultSessionDataSource].
Call [resume] when the owning component becomes active and [pause] when it is paused to
conserve battery.

Interfaces​

NameTypeSummary
LocationHelper.OnUpdateListenerOnUpdateListener
Callback interface for receiving GPS location updates.

Functions​

NameTypeSummary
createLiveDataSourceNsdkSessionDataSource
Creates a live ARCore data source that manages GPS and compass sensors internally.
The returned object also implements [DefaultLifecycleObserver]: add it to your Activity's or
Fragment's lifecycle. The compass starts on resume, so without a lifecycle it reports no
samples; GPS and compass stop on pause and destroy. GPS needs ACCESS_FINE_LOCATION, and
starts on its own once it is granted; with only approximate location it stays off and logs a
warning.
createPlaybackDataSourceNsdkSessionDataSource
Creates a playback data source that converts dataset bitmaps to YUV on a background thread.
The returned object implements [DefaultLifecycleObserver] — add it to your lifecycle
for cleanup on destroy.