Answer the question
In order to leave comments, you need to log in
How to import a ready-made database into Android?
Hello!
Just started learning how to develop android app.
There is a ready database in one file.
How to import it into Android?
Answer the question
In order to leave comments, you need to log in
I can offer my piece of code: dbLibraryHelper.java . Line 69 in my case either opens an existing database or creates a new one. In your case, there is one subtlety: in order to use a ready-made base, you need to put it on a memory card in advance. getAssetString () has a copy of assets to a string. In your case, you need to write assets to a file. See loadContentFromURL() for how to do this .
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question