[android-developers] Re: Overlay ConcurrentModificationException (continued)

2009-08-28 Thread Lex
Zsolt, the methods are defined as follows: - receiveMessage() - Service Class - showTrafficMessages() - Activity Class - updateOverlay - ItemizedOverlay Class The receiveMessage() method is called in the run method of the receiving thread object. I see now that other methods are then executed

[android-developers] Re: Overlay ConcurrentModificationException (continued)

2009-08-28 Thread Lex
So, this is what I have now: public void receiveMessage(BinaryMessage binaryMsg) { ... if ( validateMessage(binaryMsg) ) { final TrafficMessage message = createMessage(binaryMsg);

[android-developers] Re: Overlay ConcurrentModificationException (continued)

2009-08-27 Thread Zod
Hi! It's not clear where your code is located and called. If it's in the thread which receives the messages, than you're modifying UI elements from another thread which is really bad. If your code is in the activity object, and you call it directly from the network thread, than you also execute