Giter Club home page Giter Club logo

covid19tracker's Introduction

COVID-19 Tracker

An open-source Android COVID-19 tracking app built using core UI components from the Robinhood stock trading app. The app displays key metrics around the growth of coronavirus, including the number of positive cases, negative cases, and deaths per day.

Download the app from F-Droid

Author: Rahul Pandey

This app uses data from the COVID tracking project as the data source. The app currently displays data for the US, including all the states and territories.

Libraries used:

Relevant links:

License

Copyright 2020 Rahul Pandey

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

covid19tracker's People

Contributors

rpandey1234 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

covid19tracker's Issues

Scrolling too far left causes crash

Steps to repeat:

  1. Select Alaska in state drop down.
  2. Drag finger to left side of graph past March 11th and the app crashes.

This doesn't appear to be a problem for the nationwide graphs.

Shifting the graph to the left slightly

On "MAX" level, viewing the chart and its recent development is a bit difficult. I have a screen protector and a case on my phone which makes the very right side of the display unreadable. I would suggest shifting the graph to the left only a little bit for people like me to become more comfortable reading the graph.
Thanks

App crashes due to network issue

Environment Info:
APK Version 1.1 (2).
AndroidOS Version = “6.0.1”,Mobile phone has enough memory.

Description information:
We find that mobile apps are prone to crashes due to a network issue, mainly because successful network API calls return unexpected or no data.
And we found that when this app's network returned data is null or some fields are null (JSON format), a random value or the network request fails (status code is 404/503), or is empty, the app has crashed.

crash information:

Crash One:

crashActivity=edu.stanford.rkpandey.covid19tracker.MainActivity

java.lang.OutOfMemoryError: Failed to allocate a 23174278 byte allocation with 16777216 free bytes and 18MB until OOM
at java.lang.StringFactory.newStringFromChars(Native Method)
at java.lang.AbstractStringBuilder.toString(AbstractStringBuilder.java:629)
at java.lang.StringBuilder.toString(StringBuilder.java:663)
at org.json.JSONStringer.toString(JSONStringer.java:430)
at org.json.JSONArray.toString(JSONArray.java:586)
at com.InstrumentClass.typeParser.JsonParser.parseAndFuzz(JsonParser.java:44)
at com.InstrumentClass.ResponseParseAndReplace.parseInputStreamAndAddNode(ResponseParseAndReplace.java:714)
at com.InstrumentClass.ResponseParseAndReplace.parseAndReplace(ResponseParseAndReplace.java:439)
at okhttp3.RealCall$AsyncCall.execute(RealCall.java:172)
at okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
at java.lang.Thread.run(Thread.java:818)

Crash Two:

crashActivity=edu.stanford.rkpandey.covid19tracker.MainActivity

java.util.NoSuchElementException: List is empty.
at kotlin.collections.CollectionsKt___CollectionsKt.last(_Collections.kt:372)
at edu.stanford.rkpandey.covid19tracker.MainActivity.updateDisplayMetric(MainActivity.kt:157)
at edu.stanford.rkpandey.covid19tracker.MainActivity.access$updateDisplayMetric(MainActivity.kt:21)
at edu.stanford.rkpandey.covid19tracker.MainActivity$setupEventListeners$3.onCheckedChanged(MainActivity.kt:135)
at android.widget.RadioGroup.setCheckedId(RadioGroup.java:173)
at android.widget.RadioGroup.-wrap0(RadioGroup.java)
at android.widget.RadioGroup$CheckedStateTracker.onCheckedChanged(RadioGroup.java:351)
at android.widget.CompoundButton.setChecked(CompoundButton.java:159)
at edu.stanford.rkpandey.covid19tracker.MainActivity.updateDisplayWithData(MainActivity.kt:166)
at edu.stanford.rkpandey.covid19tracker.MainActivity.access$updateDisplayWithData(MainActivity.kt:21)
at edu.stanford.rkpandey.covid19tracker.MainActivity$onCreate$1.onResponse(MainActivity.kt:62)
at retrofit2.DefaultCallAdapterFactory$ExecutorCallbackCall$1.lambda$onResponse$0$DefaultCallAdapterFactory$ExecutorCallbackCall$1(DefaultCallAdapterFactory.java:89)
at retrofit2.-$$Lambda$DefaultCallAdapterFactory$ExecutorCallbackCall$1$3wC8FyV4pyjrzrYL5U0mlYiviZw.run(lambda)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5539)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:745)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:635)

Crash Three:

crashActivity=edu.stanford.rkpandey.covid19tracker.MainActivity

java.lang.NullPointerException: Attempt to invoke virtual method 'long java.util.Date.getTime()' on a null object reference
at java.util.Calendar.setTime(Calendar.java:1197)
at java.text.SimpleDateFormat.formatImpl(SimpleDateFormat.java:527)
at java.text.SimpleDateFormat.format(SimpleDateFormat.java:829)
at java.text.DateFormat.format(DateFormat.java:314)
at edu.stanford.rkpandey.covid19tracker.MainActivity.updateInfoForDate(MainActivity.kt:179)
at edu.stanford.rkpandey.covid19tracker.MainActivity.updateDisplayMetric(MainActivity.kt:157)
at edu.stanford.rkpandey.covid19tracker.MainActivity.access$updateDisplayMetric(MainActivity.kt:21)
at edu.stanford.rkpandey.covid19tracker.MainActivity$setupEventListeners$3.onCheckedChanged(MainActivity.kt:135)
at android.widget.RadioGroup.setCheckedId(RadioGroup.java:173)
at android.widget.RadioGroup.-wrap0(RadioGroup.java)
at android.widget.RadioGroup$CheckedStateTracker.onCheckedChanged(RadioGroup.java:351)
at android.widget.CompoundButton.setChecked(CompoundButton.java:159)
at edu.stanford.rkpandey.covid19tracker.MainActivity.updateDisplayWithData(MainActivity.kt:166)
at edu.stanford.rkpandey.covid19tracker.MainActivity.access$updateDisplayWithData(MainActivity.kt:21)
at edu.stanford.rkpandey.covid19tracker.MainActivity$onCreate$1.onResponse(MainActivity.kt:62)
at retrofit2.DefaultCallAdapterFactory$ExecutorCallbackCall$1.lambda$onResponse$0$DefaultCallAdapterFactory$ExecutorCallbackCall$1(DefaultCallAdapterFactory.java:89)
at retrofit2.-$$Lambda$DefaultCallAdapterFactory$ExecutorCallbackCall$1$3wC8FyV4pyjrzrYL5U0mlYiviZw.run(lambda)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5539)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:745)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:635)

Finally:
The cause of the program crash may be that the network response data is not handled properly in the code, such as null.
Although this kind of collapse is relatively rare, it is also worthy of attention.
If you have confirmed or fixed this problem, please give me a reply, thank you!

Values in some graphs are negative

Examples:

  • Negative graph for Alaska on April 14th 2020 shows a value of -213
  • Deaths graph for Colorado on May 14th 2020 shows a value of -213
  • Negative graph for Connecticut on June 23 2020 shows a value of -1,608
  • Negative graph for DC on May 24th 2020 shows a value of -11,447

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.