D
D
DivelNick2016-07-12 08:57:46
Java
DivelNick, 2016-07-12 08:57:46

How to link a database to your android application?

There are many articles on the Internet on how to programmatically create a database, and how to manage it. But what if I need to supply an already built database right along with the application? Can you give a link where this process is described, or explain how to do it?
PS I need my finished base to be packaged in apk, is it possible?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
K
Kirill Ushakov, 2016-07-12
@DivelNick

Do a database dump. Put it in a folder with resources, and when you start the application, check if the database is not deployed - install it, otherwise just connect and work with it.

A
Aleksandr, 2016-07-22
@alvlapo

A similar problem is described here , you need to look at the checkDataBase() and copyDataBase() functions

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question