Closed StefanHelmstetter closed 8 years ago
thats because the method is retrieving values from the tab I removed.. I haven't added any backend for the new add measurements on the entry screen.. I was waiting for you to finish cuz as I understood there was something wrong going on your side... hope I got the issue right
I could only find a method dbHandler.getMeasurements() in the commented section at the bottom of the class.
Sorry getMeasurementValues()
The parameters you are using are looking fine. I tried it myself and did not get any results after entering some values via the Dialog for the Measurement Input on the Daily Routine Fragment. Therefore I pulled the Database from the Device and looked into the Measurements Table it was empty. Seems to be an issue storing the values into the Database
The InsertInsulin Methods (Line 315 & 323) inside the DBHandler are never used and the InsertBloodsugar Method (Line 295) is only used in the BSInputRecommendation & bloodsugar_dialog classes. Since to my knowledge the bloodsugar dialog class is deprecated we are not storing any values. @nayera-muhammad is this true?
yes that what I was trying to say before when we had the measurements stored in another tab the data base was set up and I think leonid did it with me cuz am not sure how actually we implement the DB in our fragments.. since we changed it to the entry screen only the layout is there but no backend.. ill contact leonid to help me out to store values.
It works the same way as before.
Like this you can retrieve the data.
ArrayList<MeasureItem> insulinList = AppGlobal.getHandler().getMeasurementValues(AppGlobal.getHandler(),date,"DAY","insulin");
To store a bloodsugar value this method is the one:
void InsertBloodsugar(DataBaseHandler handler, Date date, Time time, int profile_id, double bloodsugar_level, String measure_unit)
measurements stored using InsertBloodsugar and InsertInsulin methods in DBHandler
dbHandler.getMeasurements() returns an empty list.
Either the input does not work (in Settings and DailyRoutineFragment) or the getMeasurments() function does not work.