I want outside assistance with architecture design. Lengthy story short:
- i download some data (text for labels, configurations for application, occasions for calendar itp ) via relaxation from the server. I persist that data via ormlite during my database.
- In beginning I've new thread for my relaxation stuff, and new thread for my database stuff. Now I create android plan to be mindful about relaxation (services are create in application start, in global Application and repair can be obtained for those my activities)
My real question is:
- should my service handle database stuff also?
- Is an excessive amount of for plan to be invoke, start new thread and download data from relaxation after which save it to db?
- Should my service just download data, Persist data out off service?
Also I want outside assistance with this question:
- how must i pass data downloaded from the relaxation to my application. ( objects are large, frequently they're collections)
- I ought to pass it via intent (parcelable object) when service download things i need ?
- or must i user Global Application and employ global variable that hold downloaded stuff?
- or must i just persist it to db , so when I want it simply load from database ?