Something like in https://github.com/realm/realm-java/issues/834 to delete the realm file.
There is currently an undocumented method used by the tests which deletes all realm files in the documents directory. You can do this by calling Realm.clearTestState();
Is this the behavior that you want, or you do you want the ability to specify individual Realm files rather than deleting all Realm? If the current behavior is sufficient then we can rename and document the existing functionality.
This is actually good, but why this name?
Because this method is meant as a utility for tests only.
@alazier please give us the API like the clearTestState behavior. I am just wondering why is it so hard to delete the database? For a particular point in time, I'm pretty sure what I want to do with my app and I really want just to refresh everything again. My question is, why do I need to go through all the things like define the configuration, put into an object .... to delete just some files I am totally aware that I don't want to have?
@bubuzzz Realm is using a few aux. files. Why can't you use Realm.deleteFile()?
Most helpful comment
There is currently an undocumented method used by the tests which deletes all realm files in the documents directory. You can do this by calling
Realm.clearTestState();Is this the behavior that you want, or you do you want the ability to specify individual Realm files rather than deleting all Realm? If the current behavior is sufficient then we can rename and document the existing functionality.