sdk-common / com.tomtom.online.sdk.location / LocationSourceFactory / createDefaultLocationSource

createDefaultLocationSource

@NonNull open fun createDefaultLocationSource(context: Context!, locationUpdateListener: LocationUpdateListener!): LocationSource

Creates default location source.

Parameters

context - Context!: - Android Context

locationUpdateListener - LocationUpdateListener!: - the location update listener which is common listener for both Basic and Fused location sources

Return
LocationSource: BasicLocationSource or FusedLocationSource dependably on the presence of Google Location Services

@NonNull open fun createDefaultLocationSource(context: Context!, locationUpdateListener: LocationUpdateListener!, locationRequest: LocationRequest!): LocationSource

Creates default location source.

Parameters

context - Context!: - Android Context

locationUpdateListener - LocationUpdateListener!: - the location update listener which is common listener for both Basic and Fused location sources

locationRequest - LocationRequest!: - LocationRequest of Google Location Services which is used if the GLS are present at the device.

Return
LocationSource: BasicLocationSource or FusedLocationSource dependably on the presence of Google Location Services