I have a question regarding the best overall approach for importing CSV data into SQLite databases in Android. Would you do this 'programmatically' via Java code in Android Studio (i.e. in Java, reference a file location etc and set up some code that would read it into ContentValues..etc) or would you use a SQL utility and import the file directly into the database outside of Android Studio? It seems if you choose the latter option you seem to have to 'detach' the database from the App somehow before you can then browse or update its contents using a database utility.. Any guidance in this area would be most appreciated Rowan
Asked
Active
Viewed 1,651 times
0
-
have a look at this https://stackoverflow.com/a/16672410/7136932 – Hamza Mar 17 '18 at 07:54
-
Thanks Ameer, but I think I was trying to ask more in terms of overall approach...what is the usual approach to doing a one-off load of CSV data into an apps database (?) – Rowan Mar 17 '18 at 22:44
1 Answers
0
Use library like this osiegmar/FastCSV and use custom logic to insert data into SQLite db

Aniket Bhoite
- 116
- 1
- 6