Code example for Message

Methods: setData

0
        } 
 
        Bundle messageBundle = new Bundle();
        messageBundle.putString("msg", msg);
 
        Message message = new Message();
        message.setData(messageBundle);
        mUpdateHandler.sendMessage(message);
 
    } 
 
    private synchronized void setSocket(Socket socket) {
        Log.d(TAG, "setSocket being called.");
        if (socket == null) {
            Log.d(TAG, "Setting a null socket.");
        } 
        if (mSocket != null) {
            if (mSocket.isConnected()) {
                try { 
                    mSocket.close();
                } catch (IOException e) {