问题
I am building a mobile app using jquery mobile and phonegap for both android and ios. This is just a collection of names and their addresses which amounted to over 7 thousand rows. As I've learned, phonegap doesn't support data migration so this means that if I have to use sqllite, I have to inject the large amount of data into phone's sql on first launch. I think this is a problem as it will take awhile and may force close the app, or may put off users.
Is there any other way accomplish this without causing heavy injections? is it possible to put these data in one text file? but am not sure if jqm has the ability to search and update using this method. I am clearly lost. I have searched google about this but no solution found. Please help. many thanks.
回答1:
Here is a good tutorial on how to copy and pre-created DB into your PhoneGap app:
Tutorial Link
回答2:
why don't you put a small amount of addresses in local storage and then when the user wants to request more addresses, you fetch them from an online server (like php/mysql) and parse them using json?
来源:https://stackoverflow.com/questions/9159259/large-database-for-jquery-mobile-and-phonegap