Store Realm files in Google Drive App Folder?

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.

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.

Any insights/advice appreciated.


<strong>Edit:</strong> 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.


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

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

From one of the Realm's maintainers:

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.

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

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

人吐槽 人点赞



用户名: 密码:
验证码: 匿名发表


查看评论:Store Realm files in Google Drive App Folder?