diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index c0ca5bf87f..f30cd601c0 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -22,12 +22,13 @@ + + + diff --git a/app/src/main/assets/Answers.csv b/app/src/main/assets/Answers.csv index 4db40f386a..5ca9c10042 100644 --- a/app/src/main/assets/Answers.csv +++ b/app/src/main/assets/Answers.csv @@ -1,7 +1,7 @@ -1;'RDT';10 +1;'RDT';14 2;'Sex';10 -3;'Age';12 -4;'Specie';11 +3;'Age';6 +4;'Specie';14 5;'Treatment';11 6;'Risk Group';11 7;'Phone';13 diff --git a/app/src/main/assets/Headers.csv b/app/src/main/assets/Headers.csv index 8da58ecad0..af1fe3ba01 100644 --- a/app/src/main/assets/Headers.csv +++ b/app/src/main/assets/Headers.csv @@ -1 +1 @@ -1;'Malaria Case Surveillance';'Malaria Case Surveillance';1;1 +1;'Health System QIS';'Health System QIS';1;1 diff --git a/app/src/main/assets/OptionAttributes.csv b/app/src/main/assets/OptionAttributes.csv new file mode 100644 index 0000000000..388ccec60e --- /dev/null +++ b/app/src/main/assets/OptionAttributes.csv @@ -0,0 +1,16 @@ +1;'f38b00' +2;'00b3e3' +3;'003745' +4;'f0d100' +5;'799900' +6;'f38b00' +7;'13a285' +8;'f0d100' +9;'799900' +10;'f38b00' +11;'00b3e3' +12;'f0d100' +13;'799900' +14;'f0d100' +15;'00b3e3' +16;'003745' diff --git a/app/src/main/assets/Options.csv b/app/src/main/assets/Options.csv index 99ad3fff79..9b6b55f691 100644 --- a/app/src/main/assets/Options.csv +++ b/app/src/main/assets/Options.csv @@ -1,22 +1,16 @@ -1;'Yes';0.00;1;'question_images/rdt_yes.png' -2;'No';0.00;1;'question_images/rdt_no.png' -3;'Male';0.00;2;'question_images/sex_male.png' -4;'Female';0.00;2;'question_images/sex_female.png' -5;'0-12m';0.00;3;'question_images/age_0m_12m.png' -6;'1-5years';0.00;3;'question_images/age_1y_5y.png' -7;'6-15years';0.00;3;'question_images/age_5y_15y.png' -8;'16-25years';0.00;3;'question_images/age_16y_25y.png' -9;'26-45years';0.00;3;'question_images/age_26y_45y.png' -10;'46+years';0.00;3;'question_images/age_46y.png' -11;'Pf';0.00;4;'question_images/specie_pf.png' -12;'Pv';0.00;4;'question_images/specie_pv.png' -13;'Mix';0.00;4;'question_images/specie_mix.png' -14;'N/A';0.00;4;'question_images/specie_none.png' -15;'Child';0.00;5;'question_images/treatment_child.png' -16;'Adolescent';0.00;5;'question_images/treatment_adolescent.png' -17;'Adult';0.00;5;'question_images/treatment_adult.png' -18;'Referral';0.00;5;'question_images/treatment_referral.png' -19;'In the forest?';0.00;6;'question_images/risk_group_forest.png' -20;'In the plantation?';0.00;6;'question_images/risk_group_plantation.png' -21;'Another country?';0.00;6;'question_images/risk_group_another_country.png' -22;'N/A?';0.00;6;'question_images/risk_group_none.png' +1;'វិជ្ជមាន';'Positive';0.00;1;'question_images/rdt_positive.png';1;'f38b00' +2;'អវិជ្ជមាន';'Negative';0.00;1;'question_images/rdt_negative.png';2;'00b3e3' +3;'មិនបានធ្វើតេស្តឈាម';'Not Tested';0.00;1;'question_images/rdt_no_tested.png';3;'003745' +4;'ប្រុស';'Male';0.00;2;'question_images/sex_male.png';4;'f0d100' +5;'ស្រី';'Female';0.00;2;'question_images/sex_female.png';5;'799900' +6;'ចំរុះ(Mixed)';'Mixed';0.00;4;'question_images/specie_mix.png';6;'f38b00' +7;'ផ្លាស្មូដ្យូម ហ្វាល់ស៊ីប៉ារ៉ូម(Pf)';'Plasmodium falciparum (Pf)';0.00;4;'question_images/specie_pf.png';7;'13a285' +8;'ផ្លាស្មូដ្យូម វីវ៉ាក់(Pv)';'Plasmodium vivax (Pv)';0.00;4;'question_images/specie_pv.png';8;'f0d100' +9;'ផ្តល់ឱសថសំរាប់ក្មេង';'Child';0.00;5;'question_images/treatment_child.png';9;'799900' +10;'ផ្តល់ឱសថសំរាប់មនុស្សជំទង់';'Adolescent';0.00;5;'question_images/treatment_adolescent.png';10;'f38b00' +11;'ផ្តល់ឱសថសំរាប់មនុស្សធំ';'Adult';0.00;5;'question_images/treatment_adult.png';11;'00b3e3' +12;'ធ្វើការបញ្ជូន';'Referral';0.00;5;'question_images/treatment_referral.png';12;'f0d100' +13;'ពីព្រៃ';'Forest';0.00;6;'question_images/risk_group_forest.png';13;'799900' +14;'ពីចំការ';'Plantation';0.00;6;'question_images/risk_group_plantation.png';14;'f0d100' +15;'ពីប្រទេសផ្សេងៗ';'Another Country';0.00;6;'question_images/risk_group_another_country.png';15;'00b3e3' +16;'ផ្សេងៗ';'Other';0.00;6;'question_images/risk_group_none.png';16;'003745' diff --git a/app/src/main/assets/Programs.csv b/app/src/main/assets/Programs.csv index 5c38ff1b23..97245fcb78 100644 --- a/app/src/main/assets/Programs.csv +++ b/app/src/main/assets/Programs.csv @@ -1 +1 @@ -1;'IrppF3qERB7';'Malaria Case Surveillance Program' +1;'IrppF3qERB7';'Health System QIS' diff --git a/app/src/main/assets/Questions.csv b/app/src/main/assets/Questions.csv index 4f8512482d..a7b2506dfb 100644 --- a/app/src/main/assets/Questions.csv +++ b/app/src/main/assets/Questions.csv @@ -1,7 +1,7 @@ -1;'RDT';'Rapid Diagnostic Test - Malaria';;'RDT';'OEdLEjF6Z8p';1;0;0;1;1; -2;'Sex';'Sex';;'យែនឌ័រ';'uuudizosfpU';2;0;0;1;2;1 -3;'Age';'Age';;'ដែលមានអាយុ';'JMM92njKuSc';3;0;0;1;3;1 -4;'Specie';'Specie';;'ប្រភេទ';'X6RFHreAu0L';4;0;0;1;4;1 -5;'Treatment';'Treatment';;'ការព្យាបាល';'fNpYtVaL7OV';5;0;0;1;5;1 -6;'Risk Group';'Risk Group';;'ក្រុមដែលមានហានិភ័យ';'IR2vkwx9D8H';6;0;0;1;6;1 -7;'Patient Phone Number';'Patient Phone Number';;'លេខទូរស័ព្ទ របស់អ្នកជម្ងឺ';'rDubghVv1L8';7;0;0;1;7;1 +1;'RDT';'What is your patient\'s RDT result?';;'តើលទ្ធផលតេស្តឈាមរបស់អ្នកជំងឺដោយប្រើ ឧបករណ៍ RDT បង្ហាញថាជាអ្វី?';'OEdLEjF6Z8p';1;0;0;1;1;1 +2;'Sex';'Male or Female?';;'ប្រុស ឬ ស្រី?';'uuudizosfpU';2;0;0;1;2;1 +3;'Age';'How old is your patient (years)?';;'តើអ្នកជំងឺរបស់អ្នកមានអាយុប៉ុន្មាន​(ឆ្នាំ)?';'JMM92njKuSc';3;0;0;1;3;1 +4;'Specie';'What type of malaria does your patient have?';;'តើអ្នកជំងឺរបស់អ្នកមានមេរោគគ្រុនចាញ់ប្រភេទអ្វី?';'X6RFHreAu0L';4;0;0;1;4;1 +5;'Treatment';'What type of treatment did you provide?';;'តើការព្យាបាលបែបណាដែលអ្នកផ្តល់ជូនអ្នកជំងឺ?';'fNpYtVaL7OV';5;0;0;1;5;1 +6;'Risk Group';'Where did your patient get malaria?';;'តើអ្នកជំងឺឆ្លងជំងឺគ្រុនចាញ់ពីកន្លែងណា?';'IR2vkwx9D8H';6;0;0;1;6;1 +7;'Phone';'Please enter your patient’s phone number.';;'សូមវាយបញ្ចូលលេខទូរស័ព្ទអ្នកជំងឺ';'rDubghVv1L8';7;0;0;1;7;1 diff --git a/app/src/main/assets/Tabs.csv b/app/src/main/assets/Tabs.csv index 3d65ecb219..a2505bc0a4 100644 --- a/app/src/main/assets/Tabs.csv +++ b/app/src/main/assets/Tabs.csv @@ -1 +1 @@ -1;'Malaria Case Surveillance';1;1;8 +1;'Health System QIS';1;1;8 diff --git a/app/src/main/assets/fonts/KhmerOS.ttf b/app/src/main/assets/fonts/KhmerOS.ttf new file mode 100644 index 0000000000..7aa5bdcd5b Binary files /dev/null and b/app/src/main/assets/fonts/KhmerOS.ttf differ diff --git a/app/src/main/assets/question_images/age_0m_12m.png b/app/src/main/assets/question_images/age_0m_12m.png deleted file mode 100644 index d022c93e58..0000000000 Binary files a/app/src/main/assets/question_images/age_0m_12m.png and /dev/null differ diff --git a/app/src/main/assets/question_images/age_16y_25y.png b/app/src/main/assets/question_images/age_16y_25y.png deleted file mode 100644 index ce9b5e19b9..0000000000 Binary files a/app/src/main/assets/question_images/age_16y_25y.png and /dev/null differ diff --git a/app/src/main/assets/question_images/age_1y_5y.png b/app/src/main/assets/question_images/age_1y_5y.png deleted file mode 100644 index af99c17662..0000000000 Binary files a/app/src/main/assets/question_images/age_1y_5y.png and /dev/null differ diff --git a/app/src/main/assets/question_images/age_26y_45y.png b/app/src/main/assets/question_images/age_26y_45y.png deleted file mode 100644 index 4c1e1b377e..0000000000 Binary files a/app/src/main/assets/question_images/age_26y_45y.png and /dev/null differ diff --git a/app/src/main/assets/question_images/age_46y.png b/app/src/main/assets/question_images/age_46y.png deleted file mode 100644 index a0d6c5a18d..0000000000 Binary files a/app/src/main/assets/question_images/age_46y.png and /dev/null differ diff --git a/app/src/main/assets/question_images/age_5y_15y.png b/app/src/main/assets/question_images/age_5y_15y.png deleted file mode 100644 index 4188d3ea7c..0000000000 Binary files a/app/src/main/assets/question_images/age_5y_15y.png and /dev/null differ diff --git a/app/src/main/assets/question_images/rdt_negative.png b/app/src/main/assets/question_images/rdt_negative.png new file mode 100644 index 0000000000..b57427f512 Binary files /dev/null and b/app/src/main/assets/question_images/rdt_negative.png differ diff --git a/app/src/main/assets/question_images/rdt_no.png b/app/src/main/assets/question_images/rdt_no.png deleted file mode 100644 index 31aec19a30..0000000000 Binary files a/app/src/main/assets/question_images/rdt_no.png and /dev/null differ diff --git a/app/src/main/assets/question_images/rdt_no_tested.png b/app/src/main/assets/question_images/rdt_no_tested.png new file mode 100644 index 0000000000..6b6c640551 Binary files /dev/null and b/app/src/main/assets/question_images/rdt_no_tested.png differ diff --git a/app/src/main/assets/question_images/rdt_positive.png b/app/src/main/assets/question_images/rdt_positive.png new file mode 100644 index 0000000000..a86cd2b363 Binary files /dev/null and b/app/src/main/assets/question_images/rdt_positive.png differ diff --git a/app/src/main/assets/question_images/rdt_yes.png b/app/src/main/assets/question_images/rdt_yes.png deleted file mode 100644 index 5d76a87915..0000000000 Binary files a/app/src/main/assets/question_images/rdt_yes.png and /dev/null differ diff --git a/app/src/main/assets/question_images/risk_group_another_country.png b/app/src/main/assets/question_images/risk_group_another_country.png index 07a2a9d31d..7e5fe12617 100644 Binary files a/app/src/main/assets/question_images/risk_group_another_country.png and b/app/src/main/assets/question_images/risk_group_another_country.png differ diff --git a/app/src/main/assets/question_images/risk_group_forest.png b/app/src/main/assets/question_images/risk_group_forest.png index 4ca35f088f..18d0d32d1e 100644 Binary files a/app/src/main/assets/question_images/risk_group_forest.png and b/app/src/main/assets/question_images/risk_group_forest.png differ diff --git a/app/src/main/assets/question_images/risk_group_none.png b/app/src/main/assets/question_images/risk_group_none.png index fa7304edaf..dcb2275ff4 100644 Binary files a/app/src/main/assets/question_images/risk_group_none.png and b/app/src/main/assets/question_images/risk_group_none.png differ diff --git a/app/src/main/assets/question_images/risk_group_plantation.png b/app/src/main/assets/question_images/risk_group_plantation.png index 1aa2f271d1..e3270642ba 100644 Binary files a/app/src/main/assets/question_images/risk_group_plantation.png and b/app/src/main/assets/question_images/risk_group_plantation.png differ diff --git a/app/src/main/assets/question_images/sex_female.png b/app/src/main/assets/question_images/sex_female.png index 0fe9c5fe2d..40cb9242a3 100644 Binary files a/app/src/main/assets/question_images/sex_female.png and b/app/src/main/assets/question_images/sex_female.png differ diff --git a/app/src/main/assets/question_images/sex_male.png b/app/src/main/assets/question_images/sex_male.png index b8b9d2e790..831c5f5700 100644 Binary files a/app/src/main/assets/question_images/sex_male.png and b/app/src/main/assets/question_images/sex_male.png differ diff --git a/app/src/main/assets/question_images/specie_mix.png b/app/src/main/assets/question_images/specie_mix.png index 777e88cd8d..dc73e15ab7 100644 Binary files a/app/src/main/assets/question_images/specie_mix.png and b/app/src/main/assets/question_images/specie_mix.png differ diff --git a/app/src/main/assets/question_images/specie_none.png b/app/src/main/assets/question_images/specie_none.png deleted file mode 100644 index ef6de546bc..0000000000 Binary files a/app/src/main/assets/question_images/specie_none.png and /dev/null differ diff --git a/app/src/main/assets/question_images/specie_pf.png b/app/src/main/assets/question_images/specie_pf.png index e7342f5549..29e163e2bf 100644 Binary files a/app/src/main/assets/question_images/specie_pf.png and b/app/src/main/assets/question_images/specie_pf.png differ diff --git a/app/src/main/assets/question_images/specie_pv.png b/app/src/main/assets/question_images/specie_pv.png index a44a51b95c..9f5846a374 100644 Binary files a/app/src/main/assets/question_images/specie_pv.png and b/app/src/main/assets/question_images/specie_pv.png differ diff --git a/app/src/main/assets/question_images/treatment_adolescent.png b/app/src/main/assets/question_images/treatment_adolescent.png index 051fb8698f..5fb848aead 100644 Binary files a/app/src/main/assets/question_images/treatment_adolescent.png and b/app/src/main/assets/question_images/treatment_adolescent.png differ diff --git a/app/src/main/assets/question_images/treatment_adult.png b/app/src/main/assets/question_images/treatment_adult.png index 251b42aae4..0db6924c86 100644 Binary files a/app/src/main/assets/question_images/treatment_adult.png and b/app/src/main/assets/question_images/treatment_adult.png differ diff --git a/app/src/main/assets/question_images/treatment_child.png b/app/src/main/assets/question_images/treatment_child.png index 301787c7f7..ae2cf90446 100644 Binary files a/app/src/main/assets/question_images/treatment_child.png and b/app/src/main/assets/question_images/treatment_child.png differ diff --git a/app/src/main/assets/question_images/treatment_referral.png b/app/src/main/assets/question_images/treatment_referral.png index 3528316cc8..e43dc7dfab 100644 Binary files a/app/src/main/assets/question_images/treatment_referral.png and b/app/src/main/assets/question_images/treatment_referral.png differ diff --git a/app/src/main/java/org/eyeseetea/malariacare/BaseActivity.java b/app/src/main/java/org/eyeseetea/malariacare/BaseActivity.java index 170e915b9b..82e92c8e3a 100644 --- a/app/src/main/java/org/eyeseetea/malariacare/BaseActivity.java +++ b/app/src/main/java/org/eyeseetea/malariacare/BaseActivity.java @@ -20,9 +20,12 @@ package org.eyeseetea.malariacare; import android.app.AlertDialog; +import android.content.Context; import android.content.DialogInterface; import android.content.Intent; import android.content.res.Configuration; +import android.location.Location; +import android.location.LocationManager; import android.os.Bundle; import android.support.v7.app.ActionBarActivity; import android.util.Log; @@ -34,7 +37,9 @@ import org.eyeseetea.malariacare.database.model.OrgUnit; import org.eyeseetea.malariacare.database.model.Program; import org.eyeseetea.malariacare.database.model.Survey; +import org.eyeseetea.malariacare.database.utils.LocationMemory; import org.eyeseetea.malariacare.database.utils.Session; +import org.eyeseetea.malariacare.layout.listeners.SurveyLocationListener; import org.eyeseetea.malariacare.layout.utils.LayoutUtils; import org.eyeseetea.malariacare.utils.Utils; @@ -49,6 +54,10 @@ public abstract class BaseActivity extends ActionBarActivity { */ public static final String SETTINGS_CALLER_ACTIVITY = "SETTINGS_CALLER_ACTIVITY"; + private static String TAG=".BaseActivity"; + + private SurveyLocationListener locationListener; + @Override protected void onCreate(Bundle savedInstanceState) { requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS); @@ -74,7 +83,7 @@ private void initView(Bundle savedInstanceState){ /** * Customize transitions for these activities */ - protected void initTransition(){ + protected void initTransition() { this.overridePendingTransition(R.transition.anim_slide_in_left, R.transition.anim_slide_out_left); } @@ -147,7 +156,7 @@ public void onConfigurationChanged(Configuration newConfig) { protected void goSettings(){ Intent intentSettings=new Intent(this,SettingsActivity.class); - intentSettings.putExtra(SETTINGS_CALLER_ACTIVITY,this.getClass()); + intentSettings.putExtra(SETTINGS_CALLER_ACTIVITY, this.getClass()); startActivity(new Intent(this, SettingsActivity.class)); } @@ -175,10 +184,43 @@ public void newSurvey(View v){ survey.save(); Session.setSurvey(survey); + //Look for coordinates + prepareLocationListener(survey); + //Call Survey Activity finishAndGo(SurveyActivity.class); } + private void prepareLocationListener(Survey survey){ + + locationListener = new SurveyLocationListener(survey.getId()); + LocationManager locationManager = (LocationManager) LocationMemory.getContext().getSystemService(Context.LOCATION_SERVICE); + if (locationManager.isProviderEnabled(LocationManager.GPS_PROVIDER)) { + Log.d(TAG, "requestLocationUpdates via GPS"); + locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 0, 0, locationListener); + } + + if (locationManager.isProviderEnabled(LocationManager.NETWORK_PROVIDER)) { + Log.d(TAG, "requestLocationUpdates via NETWORK"); + locationManager.requestLocationUpdates(LocationManager.NETWORK_PROVIDER, 0, 0, locationListener); + } else { + Location lastLocation = locationManager.getLastKnownLocation(LocationManager.NETWORK_PROVIDER); + + if(lastLocation != null) { + Log.d(TAG, "location not available via GPS|NETWORK, last know: "+lastLocation); + locationListener.saveLocation(lastLocation); + }else{ + String defaultLatitude = getApplicationContext().getString(R.string.GPS_LATITUDE_DEFAULT); + String defaultLongitude = getApplicationContext().getString(R.string.GPS_LONGITUDE_DEFAULT); + Location defaultLocation = new Location(getApplicationContext().getString(R.string.GPS_PROVIDER_DEFAULT)); + defaultLocation.setLatitude(Double.parseDouble(defaultLatitude)); + defaultLocation.setLongitude(Double.parseDouble(defaultLongitude)); + Log.d(TAG, "location not available via GPS|NETWORK, default: "+defaultLocation); + locationListener.saveLocation(defaultLocation); + } + } + } + /** * Finish current activity and launches an activity with the given class * @param targetActivityClass Given target activity class diff --git a/app/src/main/java/org/eyeseetea/malariacare/DashboardActivity.java b/app/src/main/java/org/eyeseetea/malariacare/DashboardActivity.java index f6d3cc292f..5ec32d6f92 100644 --- a/app/src/main/java/org/eyeseetea/malariacare/DashboardActivity.java +++ b/app/src/main/java/org/eyeseetea/malariacare/DashboardActivity.java @@ -21,21 +21,13 @@ import android.app.AlertDialog; import android.app.FragmentTransaction; -import android.content.Context; import android.content.DialogInterface; import android.content.Intent; -import android.location.Location; -import android.location.LocationListener; -import android.location.LocationManager; import android.os.AsyncTask; import android.os.Bundle; import android.util.Log; -import android.view.View; -import org.eyeseetea.malariacare.database.model.OrgUnit; import org.eyeseetea.malariacare.database.model.Program; -import org.eyeseetea.malariacare.database.model.Survey; -import org.eyeseetea.malariacare.database.model.Tab; import org.eyeseetea.malariacare.database.model.User; import org.eyeseetea.malariacare.database.utils.PopulateDB; import org.eyeseetea.malariacare.database.utils.Session; @@ -44,17 +36,16 @@ import org.eyeseetea.malariacare.services.SurveyService; import java.io.IOException; -import java.util.List; public class DashboardActivity extends BaseActivity { - private final static String TAG=".DDetailsActivity"; + private final static String TAG=".DashboardActivity"; - private LocationListener locationListener; @Override protected void onCreate(Bundle savedInstanceState) { + Log.d(TAG, "onCreate"); super.onCreate(savedInstanceState); setContentView(R.layout.fragment_dashboard); @@ -82,42 +73,18 @@ protected void initTransition(){ @Override public void onResume(){ + Log.d(TAG, "onResume"); super.onResume(); - prepareLocationListener(); AsyncPopulateDB asyncPopulateDB=new AsyncPopulateDB(); asyncPopulateDB.execute((Void) null); } @Override public void onPause(){ + Log.d(TAG, "onPause"); super.onPause(); - //No locationListener working no need to unregister - if(locationListener==null){ - return; - } - LocationManager locationManager=(LocationManager)this.getSystemService(Context.LOCATION_SERVICE); - locationManager.removeUpdates(locationListener); - } - - private void prepareLocationListener(){ - locationListener=new DashboardLocationListener(); - LocationManager locationManager=(LocationManager)this.getSystemService(Context.LOCATION_SERVICE); - if(locationManager.isProviderEnabled(LocationManager.GPS_PROVIDER)){ - Log.d(TAG,"requestLocationUpdates via GPS"); - locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER,0,0,locationListener); - } - - if(locationManager.isProviderEnabled(LocationManager.NETWORK_PROVIDER)){ - Log.d(TAG,"requestLocationUpdates via NETWORK"); - locationManager.requestLocationUpdates(LocationManager.NETWORK_PROVIDER,0,0,locationListener); - }else{ - locationListener=null; - Location lastLocation=locationManager.getLastKnownLocation(LocationManager.NETWORK_PROVIDER); - Log.d(TAG,"location not available via GPS|NETWORK, last know: "+lastLocation); - Session.setLocation(lastLocation); - } } public void getSurveysFromService(){ @@ -217,27 +184,4 @@ private void initDataIfRequired() throws IOException { } } - public class DashboardLocationListener implements LocationListener{ - - @Override - public void onLocationChanged(Location location) { - Log.d(TAG,"onLocationChanged "+location.toString()); - Session.setLocation(location); - } - - @Override - public void onStatusChanged(String provider, int status, Bundle extras) { - - } - - @Override - public void onProviderEnabled(String provider) { - - } - - @Override - public void onProviderDisabled(String provider) { - - } - } } diff --git a/app/src/main/java/org/eyeseetea/malariacare/EyeSeeTeaApplication.java b/app/src/main/java/org/eyeseetea/malariacare/EyeSeeTeaApplication.java index 672bb24b27..4b6aa85f34 100644 --- a/app/src/main/java/org/eyeseetea/malariacare/EyeSeeTeaApplication.java +++ b/app/src/main/java/org/eyeseetea/malariacare/EyeSeeTeaApplication.java @@ -30,6 +30,7 @@ import org.eyeseetea.malariacare.database.model.Survey; import org.eyeseetea.malariacare.database.model.User; import org.eyeseetea.malariacare.database.model.Value; +import org.eyeseetea.malariacare.database.utils.LocationMemory; import io.fabric.sdk.android.Fabric; @@ -42,6 +43,7 @@ public class EyeSeeTeaApplication extends com.orm.SugarApp { public void onCreate() { super.onCreate(); Fabric.with(this, new Crashlytics()); + LocationMemory.getInstance().init(getApplicationContext()); // Not previously populated tables CompositeScore.saveInTx(); QuestionRelation.saveInTx(); diff --git a/app/src/main/java/org/eyeseetea/malariacare/database/model/Option.java b/app/src/main/java/org/eyeseetea/malariacare/database/model/Option.java index d11004245a..cb8a75b9f7 100644 --- a/app/src/main/java/org/eyeseetea/malariacare/database/model/Option.java +++ b/app/src/main/java/org/eyeseetea/malariacare/database/model/Option.java @@ -8,18 +8,24 @@ public class Option extends SugarRecord