What i am trying to achieve is share data between running asynctask (doInBackground). So whats happening is that i have separate class (extends Asynctask) that loads data and activity with its own Async class which i use to update info in the activity. Basicly what i am trying to achieve is the thread in the activity (monitoring thread) to work alongside with the loader and providing some data from the loader class and when the loader is ready both the "monitoring" and the "loader" should die.
I tried having a volatile variable which I set using interfaces, but no success i cant seem to be able to share information between the threads(asynctasks).. Any suggestions? Maybe an Exchanger class is needed?