I have got following problem. I'm drawning route on mapview in separate thread like this:
public void drawRoute(final MapView mapView) {
new Thread(new Runnable() {
public void run() {
try {
//Do something useful
} catch (SomeException se) {
Handler handler = mapView.getHandler();
handler.post(/*show error in UI thread*/)
}}
}).start();
}
But when I get handler it returns null, although in debug mode handler returned and error message is displayed. What can the problem be?
PS May be it's incorrect way to get Handler, but I couldn't find information about it.