private static void addProvisionerNodes(@NonNull final SupportSQLiteDatabase database,
                                            @NonNull List<Provisioner> provisioners) {
        if (!provisioners.isEmpty()) {
            final List<NetworkKey> netKeys = getNetKeys(database);
            final List<ApplicationKey> appKeys = getAppKeys(database);
            for (Provisioner provisioner : provisioners) {
                final ProvisionedMeshNode node = new ProvisionedMeshNode(provisioner, netKeys, appKeys);
                final ContentValues values = new ContentValues();
                values.put("timestamp", node.getTimeStamp());
                values.put("name", node.getNodeName());
                values.put("mesh_uuid", node.getMeshUuid());
                values.put("uuid", node.getUuid());
                values.put("ttl", node.getTtl());
                values.put("blacklisted", node.isExcluded());
                values.put("security", node.getSecurity());
                values.put("unicast_address", node.getUnicastAddress());
                values.put("configured", node.isConfigured());
                values.put("device_key", node.getDeviceKey());
                values.put("seq_number", node.getSequenceNumber());
                values.put("mElements", MeshTypeConverters.elementsToJson(node.getElements()));
                final List<Integer> networkKeys = new ArrayList<>();
                for (NetworkKey networkKey : netKeys) {
                    networkKeys.add(networkKey.getKeyIndex());
                }
                final List<Integer> applicationKeys = new ArrayList<>();
                for (ApplicationKey applicationKey : appKeys) {
                    applicationKeys.add(applicationKey.getKeyIndex());
                }
                if (!netKeys.isEmpty()) {
                    values.put("netKeys", MeshTypeConverters.integerToJson(networkKeys));
                }
                if (!appKeys.isEmpty()) {
                    values.put("appKeys", MeshTypeConverters.integerToJson(applicationKeys));
                }
                database.insert("nodes", SQLiteDatabase.CONFLICT_REPLACE, values);
            }
        }
    }
Override the onOpen method to populate the database.
For this sample, we clear the database every time it is created or opened.
<p>
If you want to populate the database only when the database is created for the 1st time,
override RoomDatabase.Callback()#onCreate
mesh/src/main/java/no/nordicsemi/android/mesh/MeshNetworkDb.java