private void parseProvisioningState(final UnprovisionedMeshNode unprovisionedMeshNode, final byte[] data) {
        isProvisioningPublicKeySent = false;
        isProvisioneePublicKeyReceived = false;
        if (data[1] == ProvisioningState.State.PROVISIONING_COMPLETE.getState()) {
            provisioningState = new ProvisioningCompleteState(unprovisionedMeshNode);
            //Generate the network id and store it in the mesh node, this is needed to reconnect to the device at a later stage.
            final ProvisionedMeshNode provisionedMeshNode = new ProvisionedMeshNode(unprovisionedMeshNode);
            mInternalMeshManagerCallbacks.onNodeProvisioned(provisionedMeshNode, unprovisionedMeshNode.getProvisioningCapabilities().getNumberOfElements());
            mStatusCallbacks.onProvisioningCompleted(provisionedMeshNode, ProvisioningState.States.PROVISIONING_COMPLETE, data);
        } else {
            final ProvisioningFailedState provisioningFailedState = new ProvisioningFailedState();
            provisioningState = provisioningFailedState;
            if (provisioningFailedState.parseData(data)) {
                mStatusCallbacks.onProvisioningFailed(unprovisionedMeshNode, ProvisioningState.States.PROVISIONING_FAILED, data);
            }
        }
    }
Sets the provisioning callbacks

@param provisioningCallbacks {@link MeshProvisioningStatusCallbacks} callbacks
mesh/src/main/java/no/nordicsemi/android/mesh/MeshProvisioningHandler.java