I have a simple Android UI. When user clicks Button
, it takes the user's location
and then it goes to 4-5 websites
and gets all the events in that hour. Then, according to the user's location, it compares the closest ones, and according to a radius
given, it shows the event names in a new screen.
After clicking Button
, it will go into another screen and will write something like searching for location
or progress dialog
, or location identified
. After that, it'll show the events to the user. So, should I create 3 activities and 3 screens?
According to this link how to use method in AsyncTask in android?
He says don't prefer AsyncTask
for long network jobs.
I can't use location methods inside AsyncTask
. Before executing I should send location as parameter. But again, computeDistance
method needed. At post execute
method, I can post events to new UI.
But when the user clicks these events, from onClick
I can do jobs but I can't find or retrieve
info of these events.
I decided to use AsyncTask
after commenting somewhere here and someone answered me to use but I can't find that post.
And now i am unsure about to use or not.
I need webconnections
, so I don't want to make them in main. So it is good to use AsyncTask
for that but is it necessary?