e-mission / e-mission-data-collection

Repository for our own data collection
BSD 3-Clause "New" or "Revised" License
4 stars 19 forks source link

Investigate why app preferences are stored in local storage by default instead of in the native app preferences #88

Open shankari opened 8 years ago

shankari commented 8 years ago

While initializing the plugin, we planned to use shared preferences to check whether initialization was complete. The expectation was that the shared preferences would be set at the end of the onboarding process https://github.com/e-mission/e-mission-phone/blob/master/www/js/intro.js#L108 and we could just use it.

This preference seems to be set correctly, because when we read it here: https://github.com/e-mission/e-mission-phone/blob/master/www/js/controllers.js#L10 it is true after the first init, but while reading it from native code, it is false.

This is probably because the app preferences appear to use local storage by default. Need to file an issue and investigate in depth. For now, we simply set it from native code and move on.

But need to investigate further and determine whether we should use the app preferences plugin, or just go back to sqlite instead.