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
So, this is what I have now:
public void receiveMessage(BinaryMessage binaryMsg) {
...
if ( validateMessage(binaryMsg) ) {
final TrafficMessage message =
createMessage(binaryMsg);
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
3 matches
Mail list logo