How to store large data in an Android application
-
Hello all, I have made a dictionary app that communicates with a database in a server using a webservice. Now my boss wants me to embed the database inside the app so that offline users can also use the dictionary. Can you give me some advices on how to do that? How can I add whole database inside an app? Should I create an XML for each database table? Is SQLite an option? I'm open to any advices and suggestions. Thanks in advance.
-
Hello all, I have made a dictionary app that communicates with a database in a server using a webservice. Now my boss wants me to embed the database inside the app so that offline users can also use the dictionary. Can you give me some advices on how to do that? How can I add whole database inside an app? Should I create an XML for each database table? Is SQLite an option? I'm open to any advices and suggestions. Thanks in advance.
Psst, ditch your idiot boss! Why in the very first place did he need to create an entire server for web services to allow such functionality that in the end he had to download the entire server (in my mind it would be of 900+ MB) to the application. Ok, lets for a second consider that the application is downloaded and the content is also available. What makes you so sure that the client would have 1GB extra just for your application, most Android devices do not have more than 500 MB of HDD space. In such cases you must use web services. Offline? Which Android device is offline now adays. My (3) Android devices are connected to Internet and when WiFi is not present one of them provides tethering services to the two of the devices. In the end, if your boss really does want to do this, here is the thing. In Android databases are SQLite. You can read this official Android documentation about Saving Data in SQL Databases[^]. You will be able to find other resources, such as extracting and updating the data along with that document. Finally, remove the HttpClients from your application and consider using functions to extract the data from the database and show the data on screen.
The shit I complain about It's like there ain't a cloud in the sky and it's raining out - Eminem ~! Firewall !~
-
Hello all, I have made a dictionary app that communicates with a database in a server using a webservice. Now my boss wants me to embed the database inside the app so that offline users can also use the dictionary. Can you give me some advices on how to do that? How can I add whole database inside an app? Should I create an XML for each database table? Is SQLite an option? I'm open to any advices and suggestions. Thanks in advance.
USE SQLITE database and store your server database data in Android local SQLite database. Learn Android development. https://itinsidenews.com