@Override
        protected Boolean doInBackground(final Void... voids) {
            final String network = meshManagerApi.exportMeshNetwork();
            if (network == null)
                return false;
            try {
                final File directory = new File(path);
                if (!directory.exists()) {
                    if (!directory.mkdirs()) {
                        error = "Unable to create file";
                        return false;
                    }
                }
                final File file = new File(path, fileName);
                final BufferedWriter br = new BufferedWriter(new FileWriter(file.getAbsolutePath()));
                br.write(network);
                br.flush();
                br.close();
                return true;
            } catch (IOException e) {
                error = e.getMessage();
                Log.e(TAG, "Exception ex: " + error);
            }
            return false;
        }
Creates an AsyncTask to import the a mesh network

@param meshManagerApi Mesh manager api
app/src/main/java/no/nordicsemi/android/nrfmesh/utils/NetworkExportUtils.java