Fixed the app to use Android Studio 4.0, and updated to disease.sh/v3 api.
This commit is contained in:
2020-08-02 11:17:25 -04:00
parent 3aa8f94062
commit 3c6f375c0a
74 changed files with 180 additions and 156 deletions

View File

@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<module external.linked.project.id=":app" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$/.." external.system.id="GRADLE" type="JAVA_MODULE" version="4">
<module external.linked.project.id=":app" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$/.." external.system.id="GRADLE" external.system.module.group="TrackCovid19" external.system.module.version="unspecified" type="JAVA_MODULE" version="4">
<component name="FacetManager">
<facet type="android-gradle" name="Android-Gradle">
<configuration>
<option name="GRADLE_PROJECT_PATH" value=":app" />
<option name="LAST_SUCCESSFUL_SYNC_AGP_VERSION" value="3.6.3" />
<option name="LAST_KNOWN_AGP_VERSION" value="3.6.3" />
<option name="LAST_SUCCESSFUL_SYNC_AGP_VERSION" value="4.0.0" />
<option name="LAST_KNOWN_AGP_VERSION" value="4.0.0" />
</configuration>
</facet>
<facet type="android" name="Android">
@@ -19,8 +19,8 @@
<option name="ALLOW_USER_CONFIGURATION" value="false" />
<option name="MANIFEST_FILE_RELATIVE_PATH" value="/src/main/AndroidManifest.xml" />
<option name="RES_FOLDER_RELATIVE_PATH" value="/src/main/res" />
<option name="RES_FOLDERS_RELATIVE_PATH" value="file://$MODULE_DIR$/src/main/res" />
<option name="TEST_RES_FOLDERS_RELATIVE_PATH" value="" />
<option name="RES_FOLDERS_RELATIVE_PATH" value="file://$MODULE_DIR$/src/main/res;file://$MODULE_DIR$/src/debug/res;file://$MODULE_DIR$/build/generated/res/rs/debug" />
<option name="TEST_RES_FOLDERS_RELATIVE_PATH" value="file://$MODULE_DIR$/src/androidTest/res;file://$MODULE_DIR$/src/test/res;file://$MODULE_DIR$/src/androidTestDebug/res;file://$MODULE_DIR$/src/testDebug/res;file://$MODULE_DIR$/build/generated/res/rs/androidTest/debug" />
<option name="ASSETS_FOLDER_RELATIVE_PATH" value="/src/main/assets" />
</configuration>
</facet>
@@ -30,15 +30,15 @@
<output-test url="file://$MODULE_DIR$/build/intermediates/javac/debugUnitTest/classes" />
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/build/generated/aidl_source_output_dir/debug/out" isTestSource="false" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/ap_generated_sources/debug/out" isTestSource="false" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/aidl_source_output_dir/debug/out" isTestSource="false" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/buildConfig/debug" isTestSource="false" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/renderscript_source_output_dir/debug/out" isTestSource="false" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/res/rs/debug" type="java-resource" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/aidl_source_output_dir/debugAndroidTest/out" isTestSource="true" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/ap_generated_sources/debugAndroidTest/out" isTestSource="true" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/renderscript_source_output_dir/debugAndroidTest/out" isTestSource="true" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/aidl_source_output_dir/debugAndroidTest/out" isTestSource="true" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/buildConfig/androidTest/debug" isTestSource="true" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/renderscript_source_output_dir/debugAndroidTest/out" isTestSource="true" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/res/rs/androidTest/debug" type="java-test-resource" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/ap_generated_sources/debugUnitTest/out" isTestSource="true" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/src/debug/res" type="java-resource" />

View File

@@ -23,7 +23,7 @@ import retrofit2.converter.gson.GsonConverterFactory;
public class NetworkUtils {
private static final String LOG_TAG = NetworkUtils.class.getSimpleName();
private static final String BASE_URL = "https://corona.lmao.ninja/";
private static final String BASE_URL = "https://disease.sh/";
private static Retrofit getRetrofit() {
return new Retrofit.Builder().baseUrl(BASE_URL).addConverterFactory(GsonConverterFactory

View File

@@ -18,25 +18,25 @@ import retrofit2.http.Query;
public interface RestApi {
@Headers("Content-Type: application/json")
@GET("v2/states")
@GET("v3/covid-19/states")
Call<List<States>> getStatess();
@GET("v2/states")
@GET("v3/covid-19/states")
Call<List<StatesPojo>> getStates(@Query("yesterday") int y);
@GET("v2/states")
@GET("v3/covid-19/states")
Call<List<YesStatesPojo>> getYesStates(@Query("yesterday") int y);
@GET("/v2/countries")
@GET("/v3/covid-19/countries")
Call<List<CountriesPojo>> getCountries(@Query("yesterday") int y);
@GET("/v2/countries")
@GET("/v3/covid-19/countries")
Call<List<YesCountriesPojo>> getYesCountries(@Query("yesterday") int y);
@GET("v2/all")
@GET("v3/covid-19/all")
Call<World> getWorld();
@GET("v2/all?yesterday=true")
@GET("v3/covid-19/all?yesterday=true")
Call<YesWorld> getYesWorld();
//countries/USA