samedi 28 février 2015

What is the best "pattern" to use for Android settings flow?

I have an application which has a few settings, with dependencies.


So you need to enter a username, password. These may or not be invalid - they are on a remote server. There are other values for possible settings that can be retrieved. I'm having a problem sorting everything out with PostChanged handlers and network threads needing to be async - it makes it hard to have a robust way to handle settings.




  • Need username/password.




  • Needs to be valid (check server - network call)




  • If valid, need to populate a ListPreference with some possible values (network call, AND update ListPreference)




Right now things are very hack-ish, thrown together, AsyncTasks everywhere.


There's got to be a better way?


Aucun commentaire:

Enregistrer un commentaire