I've got pure (not Expo) React Native app with WatermelonDB lib for db access.
Being installed on android device the application can create, init and query database, though Flipper's database does not see any db available to the app.
The investigation revealed that db file is created in the app's root directory and not in databases. If i move db file to databases directory Flipper starts to see the db.
Father code digging gave this (WMDatabase.java:51):
// On some systems there is some kind of lock on `/databases` folder ¯\_(ツ)_/¯
path = context.getDatabasePath("" + name + ".db").getPath().replace("/databases", "");
In other words WatermelonDB lib deliberately moves db file outside /databases dir.
So the questions:
- Is "databases" directory a standard android place for db files of the application?
- Is there a simple way to use both WatermelonDB and Flipper's db plugin?