I new to android programming and I have a question regarding this need to perform long tasks in the background. I have this application that displays a list of say forum topics in listview in Activity A and when a user click an item on this list I need to display information about this item in Activity B, which includes some text and some images.
Now, this information is received from the web. Since this is communication task I should put it in a service of some sort or I might encounter an ANR.
My question is - what do I do until I receive the information. Since I can not display Activity B before getting all the information I must "hang" in Activity A until I get the information from the Web.
Can anyone instruct me about the proper design pattern for such a common flow? Some code would be very helpful too, of course.
Thanks in advance.