SwanLocation

data class SwanLocation(val latitude: Double, val longitude: Double, val accuracy: Double?, val timestamp: Long)

Geo coordinates supplied by the host app via Swan.updateLocation.

Mirrors RN's deviceDetails.location shape (RN src/index.tsx:1956-1963) verbatim so cross-platform tooling that parses the persisted credentials blob behaves the same on Android. The native port asks the host app to supply the values explicitly — the SDK does NOT bundle Geolocation as a dependency. Hosts that want a fetched location call their own provider (Google Play Services FusedLocationProvider, etc.) and then push the result here.

Constructors

Link copied to clipboard
constructor(latitude: Double, longitude: Double, accuracy: Double?, timestamp: Long)

Properties

Link copied to clipboard

Horizontal accuracy in meters at 68% confidence. null when the host app didn't supply it. Mirrors RN's accuracy field (RN src/index.tsx:1956 — RN always populates from position.coords.accuracy).

Link copied to clipboard

Latitude in WGS-84 decimal degrees.

Link copied to clipboard

Longitude in WGS-84 decimal degrees.

Link copied to clipboard

Capture timestamp in epoch milliseconds. Defaults to the SDK clock at Swan.updateLocation call time so host apps don't need to supply it. Mirrors RN's position.timestamp.