getGPSSource

fun getGPSSource(appContext: Context, nmeaSourceFile: File? = null, fileExt: String = defaultNmeaExt): LocationDataSource

Returns GPS source from NMEA file if it exists and is readable, otherwise returns the internal GPS source

Return

the LocationDataSource to pass to GPSManager.start

Parameters

appContext

the application context

nmeaSourceFile

the NMEA source file (its extension must correspond to fileExt). If null, it will search for a file with an extension that corresponds to fileExt in the external scoped storage root of the app. If no matching file is found, it uses the internal GPS of the device.

fileExt

the extension of the gps simulation file