I got the java.lang.IllegalStateException while trying to delete the realm file.
java.lang.IllegalStateException: It's not allowed to delete the file associated with an open Realm. Remember to close() all the instances of the Realm before deleting its file: /data/data/com.mypackage.name/files/filename.realm
I used both executeTransactionAsync and executeTransaction method. So, I guess that there is an instance async that I can not close it before delete the whole realm file.
How can I close all the instances of realm or how to delete realm file without getting this exception?