Code (Text): code.equals(code); if(event.getMessage() == code) The first line is useless. The second line should use .equals () when comparing strings not ==
Very true I forgot about that. And just to add to that you would schedule a delayed sync task without a delay to run something on the main thread.