You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@MapboxModule(type = MapboxModuleType.CommonHttpClient, enableConfiguration = true)
class CacheableTileHttpService(private val tileProvidersRepository : TileProvidersRepository) : HttpServiceInterface {
...
}
class MainActivity : AppCompatActivity(){
override fun onCreate(savedInstanceState: Bundle?) {
Mapbox_HttpClientModuleConfiguration.moduleProvider =
object : Mapbox_HttpClientModuleConfiguration.ModuleProvider {
override fun createHttpClient(): HttpServiceInterface =
CacheableTileHttpService(viewModel.tileProvidersRepository)
}
super.onCreate(savedInstanceState)
...
}
this leads to crash MapboxInvalidModuleException(type=CommonHttpClient)
Seems PlatformHttpService.createPlatformHttpService is called before we get a chance to set moduleProvider, even setting moduleProvider from Application class will not get a chance to get called before PlatformHttpService.createPlatformHttpService
The text was updated successfully, but these errors were encountered:
Environment
Observed behavior and steps to reproduce
Using guide to create custom http service module with
enableConfiguration
from https://github.com/mapbox/mapbox-base-android/blob/master/MODULARIZATION.md#dependency-injection leads to app crashing at startup.this leads to crash
MapboxInvalidModuleException(type=CommonHttpClient)
Seems
PlatformHttpService.createPlatformHttpService
is called before we get a chance to setmoduleProvider
, even settingmoduleProvider
from Application class will not get a chance to get called beforePlatformHttpService.createPlatformHttpService
The text was updated successfully, but these errors were encountered: