I want to check if my xyz.realm database already exists, any ideas on how tackle this?
This should work:
RealmConfiguration config = getConfig();
if (new File(config.getPath()).exists()) {
// exists
} else {
// don't exists
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With