Reputation: 2151
OVERVIEW:
I have a database that contains more than 128,000 records, and each record contains about 12 columns (8 string columns with lengths of about 1-2 words each column, and 4 columns containing reference or indices of 4 images respectively).
GOAL:
What I want basically is that when the user chooses a chapter contained in a spinner, the app shall retrieve the data relevant to the chapter chosen and display it on the screen (this is oversimplification though).
WHAT I DID but FAILED:
WHAT I'M PLANNING TO (LEARN AND) DO:
Create an SQLite Database. (But I worry how would I prepopulate it with my data? Wouldn't this lead to the 64KB limit error?)
Create a text file for each column and store them as raw resources then retrieve them using input stream. (I, TBH, don't know what I'm talking about here. I picked this up while reading some sites yesterday).
So, what should I do?
(MORE DETAILS):
Upvotes: 0
Views: 1424
Reputation: 62421
First of all you have to create Datebase from Server Side and you have to manage same Database from Android Side like SQLite.
When your application load first time, you have to copy all the data from server in chunks.(Manage OutOfMemoryError
)
then you can use all the data from SQLite so it will work speedy.
After all you have to sync do sync process as i have mentioned here.
Thanks you.
Upvotes: 3