Android Is using Application Class as a contoller OK?
I would like to have all my Activities (7 to 10 different screens) submit
data to a "controller" (sorry if I'm miss using the term).
Inside said controller data would either be uploaded or saved to data for
uploading when no internet.
The controller would do checks and processing such as:
Checking for valid session.
Attach other needed credentials before upload etc. Session/User data would
be stored in a Shared Preferences file the controller has reference to.
My goal is to have Activities do nothing more than collect the data and
call the appropriate method (with a data object) asynchronously. The
controller would know how to process the data for uploading or saving in
the database.
Would placing these methods in an extension of Application be a bad idea?
No comments:
Post a Comment