YGPS/src/com/mediatek/ygps/ClientSocket.java
public void sendCommand(String command) {
        Log.v("@M_" + TAG, "enter sendCommand");
        String sendComm = "$" + command + "*" + calcCS(command);
        Log.v("@M_" + TAG, "Send command: " + sendComm);
        if (!mSendThread.isAlive()) {
            Log.v("@M_" + TAG, "sendThread is not alive");
            mSendThread.start();
        }
        if (command.equals(sendComm) || mCommandQueue.contains(sendComm)) {
            Log.v("@M_" + TAG, "send command return because of hasn't handle the same");
            return;
        }
        try {
            mCommandQueue.put(sendComm);
        } catch (InterruptedException ie) {
            Log.w("@M_" + TAG, "send command interrupted:" + ie.getMessage());
        }
    }
/**
     * Send command to socket server.
     *
     * @param command
     *            Command need to send
     */
Send command to socket server.
@param command
Command need to send
Send command to socket server . @param command Command need to send
public void sendCommand(String command) {
        Log.v("@M_" + TAG, "enter sendCommand");
        String sendComm = "$" + command + "*" + calcCS(command);
        Log.v("@M_" + TAG, "Send command: " + sendComm);
        if (!mSendThread.isAlive()) {
            Log.v("@M_" + TAG, "sendThread is not alive");
            mSendThread.start();
        }
        if (command.equals(sendComm) || mCommandQueue.contains(sendComm)) {
            Log.v("@M_" + TAG, "send command return because of hasn't handle the same");
            return;
        }
        try {
            mCommandQueue.put(sendComm);
        } catch (InterruptedException ie) {
            Log.w("@M_" + TAG, "send command interrupted:" + ie.getMessage());
        }
    }
public void sendCommand ( String command ) { Log . v ( "@M_" + TAG , "enter sendCommand" ) ; String sendComm = "$" + command + "*" + calcCS ( command ) ; Log . v ( "@M_" + TAG , "Send command: " + sendComm ) ; if ( ! mSendThread . isAlive ( ) ) { Log . v ( "@M_" + TAG , "sendThread is not alive" ) ; mSendThread . start ( ) ; } if ( command . equals ( sendComm ) || mCommandQueue . contains ( sendComm ) ) { Log . v ( "@M_" + TAG , "send command return because of hasn't handle the same" ) ; return ; } try { mCommandQueue . put ( sendComm ) ; } catch ( InterruptedException ie ) { Log . w ( "@M_" + TAG , "send command interrupted:" + ie . getMessage ( ) ) ; } }
Send command to socket server.
Send command to socket server .