public void Start() { Logger.Log("Bluetooth Service Start"); if (connectThread != null) { connectThread.Cancel(); connectThread = null; } if (acceptThread == null) { acceptThread = new AcceptThread(this); acceptThread.Start(); } }
public void Stop() { Logger.Log("Bluetooth Service Stop"); if (connectThread != null) { connectThread.Cancel(); connectThread = null; } if (acceptThread != null) { acceptThread.Cancel(); acceptThread = null; } if (connectedThread != null) { connectedThread.Cancel(); connectedThread = null; } }