android - Fetching data from network without directly update UI -


I am preparing an Android app that should draw a chart: combo chart.

- - Array With the code> Objects (like Point type), which shows the chart being prepared I have a function that transfers this chart with the data that I transfer it to ( Points list). My question is, what is best to get this data, asynchronous and save it on the list parameter. I know that I have asyntask , threads , service ...

what is the best to choose, consider Make sure that I do not need to update the result directly on the UI , I just need to get data, finally get a trigger that if the network is used, Save from and transfer this parameter to the correct function.

Since its short background chooses the task AsyncTask , if you select the UI You want to change it later to touch, this will give you a lot of options. Plus it handles memory allocation and Grabz collection.


Comments

Popular posts from this blog

java - org.apache.http.ProtocolException: Target host is not specified -

java - Gradle dependencies: compile project by relative path -

ruby on rails - Object doesn't support #inspect when used with .include -