This is my first StackOverflow question, so I apologize for any ambiguity if there's any.
I am looking for a way to receive a callback from an Android handler.
For example, if the handler is called from within the activity, what's the proper way to receive a callback from it which let's say gonna modify some text on the screen inside that activity.
Thanks! -Yevgeniy
public class MyHandler extends Handler{
@Override
public void handleMessage (Message msg) {
//Do something
// ???send back the result to the called activity???
}
}
public class MyActivity extends Activity{
public void callHandler(){
MyHandler handler = new MyHandler();
handler.sendEmptyMessage( 0 );
}
}