I have a lot of buttons on main activity. Each button run this same AsyncTask which do HTTP POST method but post different values (which I store in Button.Tag property). So I have one AsyncTask for all buttons. Problem is when AsyncTask done his job, it should know which button must be updated in callback (button which execute AsyncTask). I don't want pass object (button instance) to AsyncTask because I read that activity can be recreated by system in many situations (orientation change, etc), so object passed to AsyncTask could be invalid. But what about View.ID property? It can be changed by system in activity life cycle too or can I use this integer value, pass it to AsyncTask and in onPostExecute find this button by this ID (calling findViewByID)?
Regards