如何开发具有数据库存储功能的PhoneGap应用程序> 5MB在几乎所有平台上分发 [英] How to develop PhoneGap app with database storage > 5MB to be distributed on almost all platforms

查看:94
本文介绍了如何开发具有数据库存储功能的PhoneGap应用程序> 5MB在几乎所有平台上分发的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用PhoneGap构建企业业务应用程序,以便在几乎所有移动平台上分发应用程序。

I am building enterprise business application using PhoneGap to be able to distribute the application on almost all mobile platforms.

我的应用程序可能需要超过5MB的离线数据库存储,和PhoneGap SQLite数据库限制为5M。

My app may need offline database storage more than 5MB, and the PhoneGap SQLite DB is limited to 5M.

一些搜索后,我发现了一个很酷的插件,这使PhoneGap能够连接SQLite DB与无限的DB大小,但不幸的是,这个解决方案是为Android和iOS只创建。

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.

有没有任何解决方法或解决方案,让我使用PhoneGap开发我的移动应用程序,并分布在几乎所有平台上DB存储超过5MB?

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?

推荐答案

只要你需要一些超越浏览器或核心phonegap框架内置的东西,你就需要本地代码。如果你很幸运,这意味着使用别人的插件,但由于大多数开发人员只关心iOS和Android,你不可能找到任何通用的。

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.

移植SQLitePlugin到另一个平台应该是相当简单的假设平台有良好的sqllite支持内置 - 插件的本机部分只有2个函数(open和executeSql),并在300行代码。

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.

这篇关于如何开发具有数据库存储功能的PhoneGap应用程序> 5MB在几乎所有平台上分发的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆