Management of data versions in IDE

RichardN

Well-Known Member
Licensed User
Longtime User
I have SQLite database that is shared between applications.

Currently, to be visible to both applications I have to add the database to the 'files' in the IDE which then makes a 'one-time' copy to the files folder. This then goes into the .apk and I have to copy it programmaticly from DirFileAssets to DirRootExternal & "\somefolder" to afford access from multiple applications. Unfortunately the SQL database file destined for the .apk only gets refreshed when it is first added....

I am left with multiple copies of the database on my PC and two copies of the data on the Android device. This is cumbersome and inefficient.

It strikes me that it would be much better to have an 'in-IDE' reference to an 'outside-IDE' asset that gets refreshed to the latest version every time the app is compiled, without having to do it manually.

As my version updating is largely data-orientated how can I manage the files better?
 
Last edited:

RichardN

Well-Known Member
Licensed User
Longtime User
Thanks Erel,

In fact it is quicker from a development POV to switch the device to USB storage mode and copy the Db to the location desired on the device... it's much quicker.

The files function of the IDE is fine for 'never changing' assets like bitmaps or icons. Where you have version upgrades that are data-only changes you have to:

- Remove old data from 'Files'
- Copy new data to 'Files'
- Recompile

If you had a single reference in the IDE to an external data asset then the need for steps 1+2 would be removed.
 
Upvote 0
Top