onConnectionChanged

private fun onConnectionChanged(newConnectionState: Boolean)

Callback that gets executed when the current connection status changes. Updates isDiscovering&isHeartbeating and calls either startDiscoverThread or startHeartbeatThread depending on newConnectionState

Parameters

newConnectionState

The new connection status (true = connected -> heartbeat, false = disconnected -> discover)