diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 0dfbd3a..f136d0c 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -10,7 +10,8 @@ android:allowBackup="true" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" - android:theme="@style/AppTheme"> + android:theme="@style/AppTheme" + android:networkSecurityConfig="@xml/ssl_verify_skip"> diff --git a/app/src/main/java/com/antonioleiva/weatherapp/data/server/ForecastByZipCodeRequest.kt b/app/src/main/java/com/antonioleiva/weatherapp/data/server/ForecastByZipCodeRequest.kt index c04858e..eaeae1f 100644 --- a/app/src/main/java/com/antonioleiva/weatherapp/data/server/ForecastByZipCodeRequest.kt +++ b/app/src/main/java/com/antonioleiva/weatherapp/data/server/ForecastByZipCodeRequest.kt @@ -8,7 +8,7 @@ class ForecastByZipCodeRequest(private val zipCode: Long, val gson: Gson = Gson( companion object { private const val APP_ID = "15646a06818f61f7b8d7823ca833e1ce" - private const val URL = "http://api.openweathermap.org/data/2.5/forecast/daily?mode=json&units=metric&cnt=7" + private const val URL = "https://api.openweathermap.org/data/2.5/forecast/daily?mode=json&units=metric&cnt=7" private const val COMPLETE_URL = "$URL&APPID=$APP_ID&zip=" } diff --git a/app/src/main/res/xml/ssl_verify_skip.xml b/app/src/main/res/xml/ssl_verify_skip.xml new file mode 100644 index 0000000..5f4f0f3 --- /dev/null +++ b/app/src/main/res/xml/ssl_verify_skip.xml @@ -0,0 +1,7 @@ + + + + + api.openweathermap.org + + \ No newline at end of file