java - Google maps Force Closes when loading overlays Asyc -


basically have maps activity when started starts thread loads in of map markers (overlays).

sometimes (probably 75% of time) when attempt interact map while thread running, throws runtimeexception message "sending message handler on dead thread". have concluded error not thrown if wait interact map until after thread done.

so initial questions are: maps api have known threading errors? there specific way 1 needs go loading maps data asynchronously? maybe there notify method need calling?

basically if run thread comment line:

mv.getoverlays().add(pin); 

the thread runs normal not add overlays, , app not crash.

i show more code if need it.

thanks

you may want @ using asynctask. here's background information on subject: http://developer.android.com/resources/articles/painless-threading.html


Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -