【问题标题】:read a html5 web database from android从 android 读取 html5 网络数据库
【发布时间】:2014-02-08 11:07:18
【问题描述】:
在 webview 中加载一个 html5 页面,用户通过这个 html5 页面输入数据并将其存储在 web sql 数据库中。这部分工作正常。现在,当设备上线时,我想从 android 端访问存储的 web sql 数据库并将数据发布到某处的服务器。
在你告诉我只拥有一个原生的 android 应用程序并使用 android 的 sqlite 数据库之前,它超出了我的控制范围,这就是已经决定的方法。
那么可以从android端读取web sql数据库吗?如果答案是肯定的,我该怎么做?
【问题讨论】:
标签:
android
sql
html
sqlite
【解决方案1】:
你只需要知道sqlite bd的位置:
try
{
String appname= this.getClass().getPackage().getName();
String bdlocation="/data/data/"+appname+"/app_database/file__0/0000000000000001.db";
}
catch (IOException e)
{
e.printStackTrace();
}
并在java中使用bdlocation打开数据库。
问候