How should i update a already existing value using realm DB in android?
I have been trying to update it but it is adding as a new value only not overwritting it
You can user insertOrUpdate method to do this.Hope this helps
Realm.getDefaultInstance().executeTransaction(new Realm.Transaction() { @Override public void execute(Realm realm) { objectToEdit.setNewValue("string"); realm.insertOrUpdate(); } });