有人知道我的应用程序可以使用适用于 Windows Phone 8 的良好数据库或 NoSql 引擎吗?
我需要能够从 SD 卡打开只读数据库文件。它需要能够处理存储 blob(png 图像),因为我想用它来提供供离线使用的 map 图 block 。数据库中需要存储 100,000 个图像 block 。
我试验过 SQLite for Windows Phone通过 C# 包装器,但我似乎无法让它与位于 SD 卡上的数据库文件一起工作。
Windows Phone 应用程序访问 SD 卡上的文件存在限制,但有可能: http://msdn.microsoft.com/library/windowsphone/develop/jj720573%28v=vs.105%29.aspx
Microsoft 员工关于我在 SQLite 方面遇到的困难的反馈:
Windows Phone apps can read specific file types from the SD card using the Microsoft.Phone.Storage APIs.
I expect that the SQLite implementation for the phone tries to open the database using standard C file API rather than using the Storage objects and so requires that the database be in the Xap or isolated storage and cannot access a database on the SD card (this is definitely the case for SQLite for Windows Store apps).
来自 SQLite SDK 社区的反馈:
显然,为具有一些 C++ 技能的人添加对 SQLite SDK 的支持应该是相当直接的(我的有点生疏!):
回复:
- http://www.mail-archive.com/sqlite-users@sqlite.org/msg81059.html
- http://www.mail-archive.com/sqlite-users@sqlite.org/msg81060.html
我原来的问题:
最佳答案
从您的评论来看,听起来一种非常不同的方法会更好。
您的要求似乎是最终用户负责使用他们的台式机/笔记本电脑将数据放在卡上。然后将卡插入手机。
如果是这种情况,那么最好的解决方案似乎是提供一个常规桌面应用程序,该应用程序可以抓取 zip 文件中的图像,然后对目标卡执行解压缩操作。本质上,该应用负责操作。
如果您需要有关这些图像的任何元数据,则应包含一个 json 或 xml 文件。
这应该比处理只读 SD 卡上的数据库简单得多。
关于c# - 适用于 Windows Phone 8 的简单 SD 卡兼容数据库/NoSql 解决方案,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20508699/