@Override
        public void onScanResult(final int callbackType, @NonNull final ScanResult result) {
            try {
                if (mFilterUuid.equals(BleMeshManager.MESH_PROVISIONING_UUID)) {
                    // If the packet has been obtained while Location was disabled, mark Location as not required
                    if (Utils.isLocationRequired(mContext) && !Utils.isLocationEnabled(mContext))
                        Utils.markLocationNotRequired(mContext);

                    updateScannerLiveData(result);
                } else if (mFilterUuid.equals(BleMeshManager.MESH_PROXY_UUID)) {
                    final byte[] serviceData = Utils.getServiceData(result, BleMeshManager.MESH_PROXY_UUID);
                    if (mMeshManagerApi != null) {
                        if (mMeshManagerApi.isAdvertisingWithNetworkIdentity(serviceData)) {
                            if (mMeshManagerApi.networkIdMatches(serviceData)) {
                                updateScannerLiveData(result);
                            }
                        } else if (mMeshManagerApi.isAdvertisedWithNodeIdentity(serviceData)) {
                            if (checkIfNodeIdentityMatches(serviceData)) {
                                updateScannerLiveData(result);
                            }
                        }
                    }
                }
            } catch (Exception ex) {
                Log.e(TAG, "Error: " + ex.getMessage());
            }
        }
MutableLiveData containing the scanner state to notify MainActivity.
app/src/main/java/no/nordicsemi/android/nrfmesh/viewmodels/ScannerRepository.java