1

I have an app receiving its data from a database in the assets folder. Now everyone has the app on their phones I want to update the database. I have the new database ready to go, but how to I get the updated database from the assets folder to their phones.

Aswin T P
  • 13
  • 5
  • you can get the data from assets folder but u can`t update that file or data base. – Hardik raiyani Nov 08 '19 at 05:03
  • asset db are read only type. when ever you will release new db version, onUpgrade() method will be invoke. write your logic inside this method. refer this, https://stackoverflow.com/a/22627776/1848157 – Radhey Nov 08 '19 at 05:06
  • you can do like this:- https://stackoverflow.com/a/19218941/9832121 then you can update it. – Hardik raiyani Nov 08 '19 at 05:07
  • app is currently using so many people , so i need to add more rows or values into my new database , how can i add my new database without delete it, now my asset folder contain new database, but i need to just copy new data to phone database without delete previous data – Aswin T P Nov 08 '19 at 06:51
  • I do not understand the problem. You just have to write some code to add the new data to the phones database. – blackapps Nov 08 '19 at 08:51

0 Answers0