There is a confusion .
In so many example i found they are coping database in assets folder.
I don't know why they are doing .and what is the benefit of doing that.
will any one explain this.please
Thanks.
A database with default data and table structure is often prebuilt and included in the assets folder. We then copy this from the assets folder to the internal or external storage at runtime, as the assets folder is ready only after compile time, and we cannot modify the data in it. Therefore, to be able to write to the database form our app, we must first copy it to a part of the storage we can access.
Sometimes, you may want to have db with prepared data. Think about address book, or zip code things. If you don't put that information in asset folder, building basic information would be a pain (Of course, you can get data via network, but that's not the point)
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