app/libs/btcar/BluetoothChatService.java
private void connectionLost() {
        // Send a failure message back to the Activity
        Message msg = mHandler.obtainMessage(BTcar.MESSAGE_TOAST);
        Bundle bundle = new Bundle();
        bundle.putString(BTcar.TOAST, "设备蓝牙连接丢失");
        msg.setData(bundle);
        mHandler.sendMessage(msg);

        // Start the service over to restart listening mode
        BluetoothChatService.this.start();
    }
/**
     * Indicate that the connection was lost and notify the UI Activity.
     */
Indicate that the connection was lost and notify the UI Activity.
Indicate that the connection was lost and notify the UI Activity .
private void connectionLost() {
        Message msg = mHandler.obtainMessage(BTcar.MESSAGE_TOAST);
        Bundle bundle = new Bundle();
        bundle.putString(BTcar.TOAST, "设备蓝牙连接丢失");
        msg.setData(bundle);
        mHandler.sendMessage(msg);
        BluetoothChatService.this.start();
    }
private void connectionLost ( ) { Message msg = mHandler . obtainMessage ( BTcar . MESSAGE_TOAST ) ; Bundle bundle = new Bundle ( ) ; bundle . putString ( BTcar . TOAST , "设备蓝牙连接丢失"); msg . setData ( bundle ) ; mHandler . sendMessage ( msg ) ; BluetoothChatService . this . start ( ) ; }
Indicate that the connection was lost and notify the UI Activity.
Indicate that the connection was lost and notify the UI Activity .
// Send a failure message back to the Activity // Start the service over to restart listening mode