VpsLocalLocationSource

constructor(context: Context, mapDatabaseDirectory: File, mapData: MapData, previewView: PreviewView? = null, foregroundService: VpsLocalForegroundService.Config? = null)

Parameters

context

application context.

mapDatabaseDirectory

directory containing the downloaded map database files.

mapData

mapdata

previewView

optional CameraX preview surface. When supplied, the source binds a live camera preview alongside its capture use case so the app can show the feed while scanning; the source owns the camera, so apps must NOT bind their own camera session. Pass null for headless (no preview).

foregroundService

optional configuration that keeps scanning alive while the app is backgrounded or the screen is off, via a camera-type foreground service (VpsLocalForegroundService). When null (the default), scanning only runs while the app is in the foreground. When supplied, the consuming app MUST declare the service and its permissions in its own manifest — see VpsLocalForegroundService.