Example:
Sync Vesrion:
int weather = getWeather();
Async version:
getweather(callback) to the other class and when other class ready to return value it use callback. callback.receiveWeather(temperature); and callback object has a overridden receiveWeather(int) method.
Question:
now how do i convert async method to sync call in android. can you give me a example ? i know it has something to do thread , wait() etc .. but do not know to implement it.