Bumped minSdk to 23 (Android 6.0), fixed AMSat SSL issue

This commit is contained in:
Arty Bishop committed 2021-06-20 14:50:29 +01:00
1 parent a26f881160
commit d603a343ca
7 files changed
+19 -19

No files matched your search

+2 -1
View File
@@ -9,7 +9,8 @@
android:name=".presentation.Look4SatApplication"
android:allowBackup="false"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name">
android:label="@string/app_name"
android:usesCleartextTraffic="true">
<activity
android:name=".presentation.Look4SatActivity"
android:theme="@style/AppTheme.Splash">
@@ -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)