Without transferring the application itself.
The point is that as the application is used, its database replenishes in size, and can occupy a tangible place in the device’s memory, which sometimes leads to known consequences (especially on "stale" devices). Therefore, I want to add the function of transferring the database to the SD card, and continuing to work with it on the SD card.
While writing this idea:
- The application, when first started, checks whether the device has an SD card.
- If there is an SD card, then the finished sqlite database is immediately unpacked onto the SD card, and the application works from the database on the SD card.
- If the SD card is not detected, then it is clear ... but here the ambush described above - over time, there may be a problem with the lack of memory device.
- Therefore, in the application I add the function of transferring the database to the SD card by the user's decision (in case the user decided to purchase and install the SD card).
And here's the main question: how to implement the transfer of the working sqlite database from the device’s memory to the SD card, and then continue to work with it?