mirror of
https://github.com/atsunatsu/Look4Sat.git
synced 2026-10-04 11:37:22 +00:00
Bumped minSdk to 23 (Android 6.0), fixed AMSat SSL issue
This commit is contained in:
1 parent
a26f881160
commit
d603a343ca
7 files changed
+19
-19
No files matched your search
@@ -37,9 +37,11 @@ import dagger.hilt.InstallIn
|
||||
import dagger.hilt.android.qualifiers.ApplicationContext
|
||||
import dagger.hilt.components.SingletonComponent
|
||||
import kotlinx.coroutines.CoroutineDispatcher
|
||||
import okhttp3.OkHttpClient
|
||||
import retrofit2.Retrofit
|
||||
import retrofit2.converter.moshi.MoshiConverterFactory
|
||||
import javax.inject.Singleton
|
||||
import javax.net.ssl.HostnameVerifier
|
||||
|
||||
@Module
|
||||
@InstallIn(SingletonComponent::class)
|
||||
@@ -109,8 +111,11 @@ object SatDataModule {
|
||||
|
||||
@Provides
|
||||
fun provideSatDataService(): SatDataService {
|
||||
val verifier = HostnameVerifier { _, _ -> true }
|
||||
val httpClient = OkHttpClient.Builder().hostnameVerifier(verifier).build()
|
||||
return Retrofit.Builder()
|
||||
.baseUrl("https://db.satnogs.org/api/")
|
||||
.client(httpClient)
|
||||
.addConverterFactory(MoshiConverterFactory.create())
|
||||
.build()
|
||||
.create(SatDataService::class.java)
|
||||
|
||||
Reference in new issue
Block a user