My Activity code:
public String getValue(JSONObject data) {
    String value;
    socket.emit("request", data, new Ack() {
        @Override
        public void call(Object... args) {
            value = (String) args[1]; // how to wait for this value?
        });
    return value;
}
How do I wait for the value that came from the socket.io callback?
 
     
    