将领域文件存储在Google云端硬盘应用文件夹中? [英] Store Realm files in Google Drive App Folder?

查看:137
本文介绍了将领域文件存储在Google云端硬盘应用文件夹中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正处于Android项目的早期阶段,该项目将使用数据库,希望使用Realm.我希望用户能够从多个Android设备(登录到相同的Google帐户)访问相同的数据库.我正在考虑将Realm文件放置在Google Drive App文件夹中.

I am in the early stages of an Android project that will be using a database, hopefully Realm. I want users to be able to access the same database from multiple Android devices (logged in to the same Google account). I am considering placing the Realm files in the Google Drive App folder.

我已经进行了一些搜索,但是没有找到关于此特定配置的讨论.

I've done some searching, but have found no discussions of this particular configuration.

我以前没有使用Realm或Google Drive API的经验,因此我担心这种方法可能存在一些致命的缺陷.

I have no prior experience with either Realm or the Google Drive API, so I'm concerned that there may be some fatal flaw(s) with this approach.

感谢任何见解/建议.

推荐答案

编辑:自从我回答了这个问题以来,Realm启动了

Since I answered this question, Realm launched the Realm Mobile Platform, which is precisely intended for doing this kind of job: Sync an application using a Realm database as the question describes. My previous answer is now obsolete.

上一个答案:目前无法通过设备同步Realms,并使应用程序始终保持最新"状态.

Previous answer: Right now isn't possible to synchronize Realms through devices and keep the app "up to date" everywhere.

Github Issues in Realm中有一个类似的问题:如何在整个Realm中同步Realm数据多个iOS/Android设备?

There is a similar question in the Github Issues in Realm: How to synchronize Realm data across multiple iOS/Android devices?

来自领域维护者之一:

由于Realm支持JSON导入,因此与Web API进行交互可能是在设备之间同步数据的最佳方法.请参阅Realm的Rest API文档.

Since Realm supports JSON importing, interacting with a Web API is probably the best way to synchronize data between devices. See Realm's Rest APIs docs.

但这是他们正在使用的功能.您可以跟踪 realm-cocoa问题#913 ,期望以此方式进行更改.

However this is a feature they're working on. You can track the realm-cocoa Issue #913 expecting changes in this way.

因此,我同意我之前引用的评论,并建议您使用API​​同步应用程序.

So, I agree with the comments I cited previously and recommend you to sync your applications using the API.

这篇关于将领域文件存储在Google云端硬盘应用文件夹中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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