hanneseilers / Mensa-SH

Android app for all cafertias of Studentenwerk Schleswig-Holstein.
Apache License 2.0
2 stars 1 forks source link

Restoring already implemented features #9

Closed hanneseilers closed 10 years ago

hanneseilers commented 10 years ago

Due to gui update some features are missing.

johan12345 commented 10 years ago

Saving last mensa is done now. Have you already done the version hints stuff or is there still something missing?

hanneseilers commented 10 years ago

The preferences are ok now. Important is the hidden section (It should be removed from preference screen on startup of the app). There is the last revision number stored to check if there was an update of the app.

johan12345 commented 10 years ago

Saving the last city doesn't work now.

hanneseilers commented 10 years ago

I'll fix it.

hanneseilers commented 10 years ago

Now city and mensa name are stored in shared preferences and saved onDestroy() of main activity.

johan12345 commented 10 years ago

Does saving the selected city and mensa work for you now? Here, it always shows Flensburg Mensa after restarting, regardless of what I selected before.

hanneseilers commented 10 years ago

For me it works. Check the result of getting the preference inside the getSelection() function of the cities and mensen loaders. And also what is saved in onDestroy() of main activity.

johan12345 commented 10 years ago

Looks like there were two problems: First, onDestroy is not called when I exit the activity with the back button or swipe it out of the multitasking view (see http://developer.android.com/reference/android/app/Activity.html#onDestroy%28%29). Maybe it works for you because you have less RAM. But we should use onPause for that. Second, when the preference is not set yet, you set it to not save it by default. But the default value for the preference in the Preferences Activity was true, so it wasn't behaving as expected after I cleared data for the app. I resolved those issues now.