Git Product home page Git Product logo

va-kidney-android's Introduction

Development Environment

This Project built with default latest Android Studio & SDK Android SDK Version Compiler 27 Testing device: Android 8.0.0

Building the app

  1. Install Android Studio & Android SDK
  2. Open Android Studio and Import the project.
  3. Install Latest Android SDK Tools and Android SDK Platform API 27 from SDK Manager
  4. Create Android Emulator AVD from AVD Manager. Choose Android with Target Android 5.0 Lolipop or newer. Make sure you choose Google APIs Target.
  5. Run the project.

Google Fit Integration

This project uses Google Fit API for Android. You need to follow this instruction to make sure the app works properly. https://developers.google.com/fit/android/get-started

Open Source Project used in this project:

  • com.makeramen:roundedimageview:2.3.0
  • com.github.PhilJay:MPAndroidChart:v3.0.3
  • Glide
  • Retrofit 2
  • Sugar ORM

Open API used in this project:

  • FDA API
  • USDA NDB API

Testing Account

We can register to the app and the data will be stored in the local database. We can log in to the app using the registered account.

Configurations

We can cofigure the FDA API and USDA NDB API endpoint and API key by editing the build.gradle file app/build.gradle

  • final FDA_BASE_URL = "https://api.fda.gov/"
  • final NDB_BASE_URL = "https://api.nal.usda.gov/"
  • final FDA_API_KEY = "M19F7ValXdbz2jGtnLIEG77VgNyw4TQS4JXOY6hW"
  • final NDB_API_KEY = "RRsuimKHTOocPYhmzonbv03mIqN3CB7OGzaQtvlE"

Troubleshooting

If you have trouble with running the app. Please make sure to disable Android Studio Instant Run feature.

Video Demo

Video Demo Challenge 2

https://drive.google.com/file/d/1y8MxAK4QYvccHtGmki6vrkq32IofHXq0/view?usp=drivesdk

va-kidney-android's People

Contributors

abinashnp avatar afrisalyp avatar akmarif83 avatar donmarsh avatar gatorboy avatar gauravkheterpal avatar jaydevm avatar kevinleigh avatar ksmacleod99 avatar lakshmansai avatar mul1sh avatar nahidshahin avatar rockaport avatar suppermancool avatar talesforce avatar

Stargazers

 avatar  avatar

Watchers

 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

va-kidney-android's Issues

Blood Pressure

Blood pressure is systolic/dystolic. You need to provide a way to input 2 values and display them on graph as separate lines

Build a Register Functionality

  • Add a Register screen which is styled similar to Login screen
  • User will enter the following fields - name, email, password, confirm password
  • Store the credentials in on device database so even if user kills the app, they are able to login again into an active session

As a user, I need to enter lab values provided by my healthcare provider

On the Chart screen, build a mechanism that allow the user to enter the various lab values obtained from their healthcare provider. This screen should focus on the lab values associated with the user's current disease stage located here.

We should store the data in Google Fit to allow secure storage and sharing among other apps.

[$10] - Layout issue when user enters a long name

Steps to Reproduce

  1. Login as a valid user
  2. Complete the profile data and click Generate Goals
  3. Go to Home page
  4. Click Menu > My health Profile
  5. Change the name to 'Daniel Michael Blake Day-Lewis'
  6. Check the header

Actual Result(s)

  • Layout issue when user enters a long name

Expected Result(s)

  • Must move the profile image when user enters a long name, it's position must be fixed
  • After entering a long name DOB must not hidden

Frequency

  • 5/5

Environment Details

  • Device(s): Samsung Galaxy S5
  • Operating System: Android 6.0.1
  • Size: 5.1 inches (~69.6% screen-to-body ratio)
  • Resolution: 1080 x 1920 pixels (~432 ppi pixel density)
  • Browser(s): Chrome 64.0.3282.137

Image(s)/Video(s)/Console Log/Crash Log

screenshot_2018-08-28-21-31-54

[$20] - Name on the menu is not updating once user updated the name via profile

Steps to Reproduce

  1. Login as a valid user
  2. Complete the profile data and click Generate Goals
  3. Go to Home page
  4. Click Menu > My health Profile
  5. Change the name to 'Test Test'
  6. Click menu and check the green bar
  7. Name on the Profile/Home page are updates

Actual Result(s)

  • Name on the menu is not updating once user updated the name via profile

Expected Result(s)

  • Must update the name on the menu (Green section)

Frequency

  • 5/5

Environment Details

  • Device(s): Samsung Galaxy S5
  • Operating System: Android 6.0.1
  • Size: 5.1 inches (~69.6% screen-to-body ratio)
  • Resolution: 1080 x 1920 pixels (~432 ppi pixel density)
  • Browser(s): Chrome 64.0.3282.137

Image(s)/Video(s)/Console Log/Crash Log

screenshot_2018-08-29-15-41-36

app will crash if I save a new goal

app will crash if I tap on a goal item image not on the buttons

03-29 10:06:38.802 21029-21029/com.topcoder.vakidney E/AndroidRuntime: FATAL EXCEPTION: main
                                                                       Process: com.topcoder.vakidney, PID: 21029
                                                                       java.lang.RuntimeException: Unable to start activity ComponentInfo{com.topcoder.vakidney/com.topcoder.vakidney.AddNewGoalActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'int com.topcoder.vakidney.model.Goal.getTitle()' on a null object reference
                                                                           at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3253)
                                                                           at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3349)
                                                                           at android.app.ActivityThread.access$1100(ActivityThread.java:221)
                                                                           at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1794)
                                                                           at android.os.Handler.dispatchMessage(Handler.java:102)
                                                                           at android.os.Looper.loop(Looper.java:158)
                                                                           at android.app.ActivityThread.main(ActivityThread.java:7224)
                                                                           at java.lang.reflect.Method.invoke(Native Method)
                                                                           at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)
                                                                           at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)
                                                                        Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'int com.topcoder.vakidney.model.Goal.getTitle()' on a null object reference
                                                                           at com.topcoder.vakidney.AddNewGoalActivity.onCreate(AddNewGoalActivity.java:89)
                                                                           at android.app.Activity.performCreate(Activity.java:6876)
                                                                           at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1135)
                                                                           at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3206)
                                                                           at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3349) 
                                                                           at android.app.ActivityThread.access$1100(ActivityThread.java:221) 
                                                                           at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1794) 
                                                                           at android.os.Handler.dispatchMessage(Handler.java:102) 
                                                                           at android.os.Looper.loop(Looper.java:158) 
                                                                           at android.app.ActivityThread.main(ActivityThread.java:7224) 
                                                                           at java.lang.reflect.Method.invoke(Native Method) 
                                                                           at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230) 
                                                                           at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120) 

[$10] - No icon for the Name field

Steps to Reproduce

  1. Login as a valid user
  2. Complete the profile data and click Generate Goals
  3. Go to Home page
  4. Click Menu > My health Profile
  5. Check the green box in-front of the name field

Actual Result(s)

  • No icon for the Name field

Expected Result(s)

  • Must have an icon for the name field because all the others fields do have icons

Frequency

  • 5/5

Environment Details

  • Device(s): Samsung Galaxy S5
  • Operating System: Android 6.0.1
  • Size: 5.1 inches (~69.6% screen-to-body ratio)
  • Resolution: 1080 x 1920 pixels (~432 ppi pixel density)
  • Browser(s): Chrome 64.0.3282.137

Image(s)/Video(s)/Console Log/Crash Log

screenshot_2018-08-28-21-35-31

As a user, I need to enter my profile information

In the profile screen, the user should be able to enter/save the following:

  • Age (Based on Date of Birth) (Health Kit if available)
  • Height (Health Kit if available)
  • Current Weight (Health Kit if available)
  • Dialysis indicator (true or false)
  • Disease Category: Stage 1, 2, 3a, 3b, 4, 5

These selections will be based on other parts of the system

  • Goal setup access: Allows user to choose goals. This will be a selection from a list to be provided at a later date
  • Biometric data: Allows the user to authorise the app to use Google Fit data

Goals Changes

  • Under food goals, Bowls should be Servings.
  • Meat should be Oz not Pieces.
  • Fluid should be Oz not Glasses
  • Alcohol should be removed
  • Run should be Workout and Minutes not miles.

Add obligatory measurements based off of comorbid conditions

Under "My Health Profile" add the ability to add a comorbid condition and force corresponding daily measurement to the top of the home screen.

Comorbidities:

  1. Hypertension
  2. Diabetes mellitus
  3. Congestive heart failure

If hypertension, then add OBLIGATORY daily measurement of blood pressure on HOME + add chart to follow the daily variations of BP.

If diabetes mellitus, then add OBLIGATORY daily measurement of blood glucose on HOME + add chart to follow the variation.

If congestive heart failure, then add OBLIGATORY daily body weight measurement. In patients who are not on dialysis, it must not be 3kg or higher than on previous day. Add a chart to follow the variation.

Add "Always measure either before or after going to toilet in the morning. If your weight is 3kg or higher than usual, speak to your general practitioner to adjust diuretics" on the body weight measurement screen.

See topcoderinc/va-kidney-ios#53 for a detailed discussion

Code Quality Issues

  1. mRecycleView is never used in any of adapters. You followed a pattern with context and parent but with parent never used there’s clearly no need to have include that reference generally (it could be rather added for a case when actually needed).

  2. For view binding: you’ve removed the field-based usage, however a lot of inline bindings are still in place: http://take.ms/LFd0Y some of them right near a binder (http://take.ms/wqGiD) Ideally should be cleaned up as well.

Comorbid condition Issues

  1. Comorbid condition measurements shouldn’t be added to goals (check iOS app). On the Home screen they work correctly (filled bar after a measurement today, show most recent one) They are making apps stop responding when tapped (from goals screen). Looks to occur when using generate goals after adding conditions

  2. Unselecting a comorbid condition in profile crashes the app (after making measurements): http://take.ms/iRfQe Also looks to be related with comorbid goals added…

As a user, I need a way to record my food intake

The user will enter the following information:

  • Meal type (Breakfast,Lunch,Dinner,Snack,Casual)
  • Date/time of meal
  • Meal items (individually)
  • Item Name
  • Quantity
  • Unit of Measure
  • [Optional] Picture of meal

The data will be stored locally on the users device and available to be referenced by other parts of the app.

Add Meal Changes

The issue is that when a person adds a meal item, they do not know which was selected from the USDA database. For example, if you enter "Chicken Noodle Soup", it's impossible to know which of the options were selected (brand, type, etc).

A better way to do this would be to search as the user is entering the food item. This way they could select the exact item they are eating.

See how the iOS app handled this

meal

For a detailed discussion, see topcoderinc/va-kidney-ios#65

Code Quality Issues

  1. There are multiple cases where there are uppercase package names(i.e CustomView, Util, Model etc), this is not a recommended standard, please can we rename them to recommended lowercase naming?

  2. Classe are not properly formatted, indentation, missing whitespace etc

  3. BaseAdapter is not an ideal choice for handling list data and its recommended to use RecyclerView.Adapter (especially when BaseAdapter implementation is not even using ViewHolder pattern, without ViewHolder pattern there will be performance issues that will impact in the smoothness of scrolling lists, this might get raised when used by multiple users who will start to pick up issues with lists in the App)

  4. Why use an entire Third-Party library(com.makeramen:roundedimageview:2.3.0) to have a circular image, when the App already has Glide which has image transforms that can make the image circular when loading it into ImageView.

[$10] - Layout issue in the workout goals progress bar when user go to the profile page and come back to the home page

Steps to Reproduce

  1. Login as a valid user
  2. Complete the profile data and click Generate Goals
  3. Go to Home page
  4. Click Menu > My health Profile
  5. Click Home from below menu

Actual Result(s)

  • Layout issue in the workout goals progress bar when user go to the profile page and come back to the home page

Expected Result(s)

  • Must not overlap the gree progress bar with the text

Frequency

  • 5/5

Environment Details

  • Device(s): Samsung Galaxy S5
  • Operating System: Android 6.0.1
  • Size: 5.1 inches (~69.6% screen-to-body ratio)
  • Resolution: 1080 x 1920 pixels (~432 ppi pixel density)
  • Browser(s): Chrome 64.0.3282.137

Image(s)/Video(s)/Console Log/Crash Log

screenshot_2018-08-28-20-36-47

Change Food Intake screen to allow better food entry

Currently the food intake screen takes a comma separated list of items, but only offers a single amount and unit of measurement. This would not work for most meals as an individual may have multiple items in a single meal.

As such, we should make a "add food item" button within the intake form to allow users to continuously add food items to a meal. We should move the amount and unit fields to this new form.

On the intake form, we can change to a table or list of the items entered. Allowing a user easy ways to edit/delete items.

Code Refactoring, Optimisation & Cleanup

@KevinLeigh - As discussed, let's do the following optimisations on the Android app

  • Remove unnecessary third-party libraries (i.e ButterKnife can be replaced with Android Databinding)
  • Upgrade old libraries to latest version and upgrade build.gradle script
  • Create recommended Build Variants for develop and production builds so that there is no need to change hardcoded values
    in build.gradle.
  • Upgrade layouts to use ConstraintLayout as much as possible to increase performance by reducing nested layouts and overdraw.
  • Upgrade project to use Android Architecture Components such as LiveData and ViewModel, the list of pros is quite high.
  • Code should be commented consistently

[$15] - Duplicate Goals displayed in the home page

Steps to Reproduce

  1. Login as a valid user
  2. Complete the profile data and click Generate Goals
  3. Go to Home page

Actual Result(s)

  • Duplicate Goals displayed in the home page [ Workout and Sodium Intake]

Expected Result(s)

  • Must not display the same goals multiple times

Frequency

  • 5/5

Environment Details

  • Device(s): Samsung Galaxy S5
  • Operating System: Android 6.0.1
  • Size: 5.1 inches (~69.6% screen-to-body ratio)
  • Resolution: 1080 x 1920 pixels (~432 ppi pixel density)
  • Browser(s): Chrome 64.0.3282.137

Image(s)/Video(s)/Console Log/Crash Log

screenshot_2018-08-28-20-38-26

If I add a drug to a new meal and then delete the drug, and then save meal will crash the app

If I add a drug to a new meal and then delete the drug, and then save meal will crash the app

03-29 09:33:43.642 18333-18333/com.topcoder.vakidney E/AndroidRuntime: FATAL EXCEPTION: main
                                                                       Process: com.topcoder.vakidney, PID: 18333
                                                                       java.lang.ArrayIndexOutOfBoundsException: length=0; index=0
                                                                           at com.topcoder.vakidney.model.DrugInteraction.findByDrugs(DrugInteraction.java:40)
                                                                           at com.topcoder.vakidney.AddNewMealActivity$7.onClick(AddNewMealActivity.java:226)
                                                                           at android.view.View.performClick(View.java:5697)
                                                                           at android.widget.TextView.performClick(TextView.java:10826)
                                                                           at android.view.View$PerformClick.run(View.java:22526)
                                                                           at android.os.Handler.handleCallback(Handler.java:739)
                                                                           at android.os.Handler.dispatchMessage(Handler.java:95)
                                                                           at android.os.Looper.loop(Looper.java:158)
                                                                           at android.app.ActivityThread.main(ActivityThread.java:7224)
                                                                           at java.lang.reflect.Method.invoke(Native Method)
                                                                           at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)
                                                                           at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)

[$10] - Long name is not displayed properly on home page

Steps to Reproduce

  1. Login as a valid user
  2. Complete the profile data and click Generate Goals
  3. Go to Home page
  4. Click Menu > My health Profile
  5. Change the name to 'Daniel Michael Blake Day-Lewis'
  6. Go to Home page and check below the 'Welcome' text

Actual Result(s)

  • Long name is not displayed properly on home page

Expected Result(s)

  • Must trim the name or must display only first part of the name (First name)

Frequency

  • 5/5

Environment Details

  • Device(s): Samsung Galaxy S5
  • Operating System: Android 6.0.1
  • Size: 5.1 inches (~69.6% screen-to-body ratio)
  • Resolution: 1080 x 1920 pixels (~432 ppi pixel density)
  • Browser(s): Chrome 64.0.3282.137

Image(s)/Video(s)/Console Log/Crash Log

screenshot_2018-08-28-20-38-26

[$10] - Can enter today's date as DOB

Steps to Reproduce

  1. Login as a valid user
  2. Complete the profile data and click Generate Goals
  3. Go to Home page
  4. Click Menu > My health Profile
  5. Enter 2018 Aug 28 as the DOB
  6. Click OK and observe

Actual Result(s)

  • Can enter today's date as DOB

Expected Result(s)

  • In iOS we can't choose above 2002; Must apply the same restriction here as well

Frequency

  • 5/5

Environment Details

  • Device(s): Samsung Galaxy S5
  • Operating System: Android 6.0.1
  • Size: 5.1 inches (~69.6% screen-to-body ratio)
  • Resolution: 1080 x 1920 pixels (~432 ppi pixel density)
  • Browser(s): Chrome 64.0.3282.137

Image(s)/Video(s)/Console Log/Crash Log

screenshot_2018-08-28-21-32-25

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.