private void initIsConnectedLiveData(final boolean connectToNetwork) {
        if (connectToNetwork) {
            mIsConnected = new SingleLiveEvent<>();
        } else {
            mIsConnected = new MutableLiveData<>();
        }
    }
Connect to peripheral

@param device bluetooth device
app/src/main/java/no/nordicsemi/android/nrfmesh/viewmodels/NrfMeshRepository.java