private void parseNotifications(final byte[] unsegmentedPdu) {
        try {
            switch (unsegmentedPdu[0]) {
                case PDU_TYPE_NETWORK:
                    //MeshNetwork PDU
                    MeshLogger.verbose(TAG, "Received network pdu: " + MeshParserUtils.bytesToHex(unsegmentedPdu, true));
                    mMeshMessageHandler.parseMeshPduNotifications(unsegmentedPdu, mMeshNetwork);
                    break;
                case PDU_TYPE_MESH_BEACON:
                    //Validate SNBs against all network keys
                    NetworkKey networkKey;
                    for (int i = 0; i < mMeshNetwork.getNetKeys().size(); i++) {
                        networkKey = mMeshNetwork.getNetKeys().get(i);
                        final byte[] receivedBeaconData = new byte[unsegmentedPdu.length - 1];
                        System.arraycopy(unsegmentedPdu, 1, receivedBeaconData, 0, receivedBeaconData.length);
                        final SecureNetworkBeacon receivedBeacon = new SecureNetworkBeacon(receivedBeaconData);

                        final byte[] n = networkKey.getTxNetworkKey();
                        final int flags = receivedBeacon.getFlags();
                        final byte[] networkId = SecureUtils.calculateK3(n);
                        final int ivIndex = receivedBeacon.getIvIndex().getIvIndex();
                        MeshLogger.debug(TAG, "Received mesh beacon: " + receivedBeacon);

                        final SecureNetworkBeacon localSecureNetworkBeacon = SecureUtils.createSecureNetworkBeacon(n, flags, networkId, ivIndex);
                        //Check the the beacon received is a valid by matching the authentication values
                        if (Arrays.equals(receivedBeacon.getAuthenticationValue(), localSecureNetworkBeacon.getAuthenticationValue())) {
                            MeshLogger.debug(TAG, "Secure Network Beacon authenticated.");

                            //  The library does not retransmit Secure Network Beacon.
                            //  If this node is a member of a primary subnet and receives a Secure Network
                            //  beacon on a secondary subnet, it will disregard it.
                            if (mMeshNetwork.getPrimaryNetworkKey() != null && networkKey.keyIndex != 0) {
                                MeshLogger.debug(TAG, "Discarding beacon for secondary subnet with network key index: " + networkKey.keyIndex);
                                return;
                            }

                            // Get the last IV Index.
                            /// The last used IV Index for this mesh network.
                            final IvIndex lastIvIndex = mMeshNetwork.getIvIndex();
                            MeshLogger.debug(TAG, "Last IV Index: " + lastIvIndex.getIvIndex());
                            /// The date of the last change of IV Index or IV Update Flag.
                            final Calendar lastTransitionDate = lastIvIndex.getTransitionDate();
                            /// A flag whether the IV has recently been updated using IV Recovery procedure.
                            /// The at-least-96h requirement for the duration of the current state will not apply.
                            /// The node shall not execute more than one IV Index Recovery within a period of 192 hours.
                            final boolean isIvRecoveryActive = lastIvIndex.getIvRecoveryFlag();
                            /// The test mode disables the 96h rule, leaving all other behavior unchanged.
                            final boolean isIvTestModeActive = ivUpdateTestModeActive;

                            final boolean flag = allowIvIndexRecoveryOver42;
                            if (!receivedBeacon.canOverwrite(lastIvIndex, lastTransitionDate, isIvRecoveryActive, isIvTestModeActive, flag)) {
                                String numberOfHoursSinceDate = ((Calendar.getInstance().getTimeInMillis() -
                                        (lastTransitionDate != null ? lastTransitionDate.getTimeInMillis() : 0)) / (3600 * 1000)) + "h";
                                MeshLogger.warn(TAG, "Discarding beacon " + receivedBeacon.getIvIndex() +
                                        ", last " + lastIvIndex.getIvIndex() + ", changed: "
                                        + numberOfHoursSinceDate + " ago, test mode: " + ivUpdateTestModeActive);
                                return;
                            }

                            final IvIndex receivedIvIndex = receivedBeacon.getIvIndex();
                            if (receivedIvIndex.getIvIndex() > lastIvIndex.getIvIndex()) {
                                mMeshNetwork.ivIndex = receivedIvIndex;
                                MeshLogger.info(TAG, "Applying: " + mMeshNetwork.ivIndex.getIvIndex());
                            } else {
                                // This will leave the IV update active state intact or will switch from false to true.
                                // canOverwrite() ensures this by discarding the secureNetworkBeacon received.
                                mMeshNetwork.ivIndex.setIvUpdateActive(receivedIvIndex.isIvUpdateActive());
                                MeshLogger.info(TAG, "Setting IV Update Active to: " + receivedIvIndex.isIvUpdateActive());
                            }

                            // If the IV Index used for transmitting messages effectively increased,
                            // the Node shall reset the sequence number to 0x000000.
                            if (mMeshNetwork.ivIndex.getTransmitIvIndex() > lastIvIndex.getTransmitIvIndex()) {
                                MeshLogger.info(TAG, "Resetting local sequence numbers to 0");
                                final Provisioner provisioner = mMeshNetwork.getSelectedProvisioner();
                                final ProvisionedMeshNode node = mMeshNetwork.getNode(provisioner.getProvisionerUuid());
                                node.setSequenceNumber(0);
                            }

                            //Updating the iv recovery flag
                            if (lastIvIndex != mMeshNetwork.ivIndex) {
                                final boolean ivRecovery = mMeshNetwork.getIvIndex().getIvIndex() > lastIvIndex.getIvIndex() + 1
                                        && !receivedBeacon.getIvIndex().isIvUpdateActive();
                                mMeshNetwork.getIvIndex().setIvRecoveryFlag(ivRecovery);
                            }

                            if (!mMeshNetwork.ivIndex.getIvRecoveryFlag()) {
                                final Iterator<Entry<Integer, List<Integer>>> iterator = mMeshNetwork.networkExclusions.entrySet().iterator();
                                while (iterator.hasNext()) {
                                    final Entry<Integer, List<Integer>> exclusions = iterator.next();
                                    final int expectedIncrement = exclusions.getKey() + 2;
                                    if (mMeshNetwork.ivIndex.getIvIndex() >= expectedIncrement) {
                                        // Clear the last known sequence number of addresses that are to be removed from the exclusion list.
                                        // Decided to retain the last known sequence number as the IV Indexes increment the sequence number
                                        // will be greater than the last known anyways
                                        //for (Integer address : mMeshNetwork.networkExclusions.get(expectedIncrement)) {
                                        //    mMeshNetwork.sequenceNumbers.removeAt(address);
                                        //}
                                        iterator.remove();
                                    }
                                }
                            }
                        }
                    }
                    break;
                case PDU_TYPE_PROXY_CONFIGURATION:
                    //Proxy configuration
                    MeshLogger.verbose(TAG, "Received proxy configuration message: " + MeshParserUtils.bytesToHex(unsegmentedPdu, true));
                    mMeshMessageHandler.parseMeshPduNotifications(unsegmentedPdu, mMeshNetwork);
                    break;
                case PDU_TYPE_PROVISIONING:
                    //Provisioning PDU
                    MeshLogger.verbose(TAG, "Received provisioning message: " + MeshParserUtils.bytesToHex(unsegmentedPdu, true));
                    mMeshProvisioningHandler.parseProvisioningNotifications(unsegmentedPdu);
                    break;
            }
        } catch (ExtendedInvalidCipherTextException ex) {
            //TODO handle decryption failure
        } catch (IllegalArgumentException ex) {
            MeshLogger.error(TAG, "Parsing notification failed: " + MeshParserUtils.bytesToHex(unsegmentedPdu, true) + " - " + ex.getMessage());
        }
    }
Parses notifications received by the client.

@param unsegmentedPdu pdu received by the client.
mesh/src/main/java/no/nordicsemi/android/mesh/MeshManagerApi.java