1
Hello, I would like your help if there is a possibility to open a database. db (instead of creating the file) by android studio using sqlite.
I’ve already created a data file. db with the data and played inside the device folder (date/date...etc), the database will only serve for query, I imagine it is in the Oncreate method of the Sqliteopenhelper class that can open the database, but I have no idea how.
Voce needs to create the way to open dabases from your sqlite helper normally, well, if the helper is creating db, it will create in the folder /data/user/0/com.seodominio.suaapp/Databases, then simply Browse the file you have in this folder with the file you created and voilá, remembering that it should be the same as the one you create in the helper, because the methods will have to search them through their columns and etc.
– Armando Marques Sobrinho
So this is the procedure that I did, it creates the database, but I wanted to know if there is any method that I can open it referencing it in some directory, instead of creating and overlapping.
– Bruno Lauria
I was floating in this... you create and/or open the db with sqlitehelper methods, if you want to handle this file you would have to have a tool for it installed on the device or fill it with the data q vc needs when it is created using a csv file or any other in the res/raw folder or app/Assets
– Armando Marques Sobrinho
I answered that question which may be what you want https://answall.com/questions/234894/loading-um-banco-sqlite-criado-externalit/234960#234960
– Marceloawq