问题
I am building enterprise business application using PhoneGap to be able to distribute the application on almost all mobile platforms.
My app may need offline database storage more than 5MB, and the PhoneGap SQLite DB is limited to 5M.
After some search I found a cool plugin which make PhoneGap able to connect the SQLite DB with unlimited DB size, but unfortunately this solution is created for Android and iOS only.
Is there any workaround or solution to let me develop my mobile app using PhoneGap and distribute on almost all platforms with DB storage more than 5MB?
回答1:
As soon as you need something beyond what is built into the browser or core phonegap framework, you will need native code. If you're lucky that will mean using someone else's plugin, but since most developers only care about iOS and Android, you are unlikely to find anything universal.
Porting SQLitePlugin to another platform should be pretty straightforward assuming that platform has good sqllite support built in - the native part of the plugin has only 2 functions (open and executeSql) and is under 300 lines of code.
回答2:
you can write your own plugin. Creating a plugin in phonegap is not so difficult if you know the target platform's language.
if you ever had some exposure to java. probably you can create your own plugin, there are few blackberry plugins available here .. may be you can port the plugin you found for android to blackberry.
回答3:
This will hopefully help. I already answered the same question before, so I'm just going to link to the answer here. . . . .
Phonegap Offline Database
You can use the following ::
- SQLite
- LocalStorage
- Native DB for any OS. By calling the Phonegap plugin to your Native DB model class, and passing the parameters as arguments to be entered into the DB.
- Indexed DB
来源:https://stackoverflow.com/questions/13441339/how-to-develop-phonegap-app-with-database-storage-5mb-to-be-distributed-on-alm