realm-mobile-platform

How do Realm add existing user data to the mobile platform?

此生再无相见时 提交于 2019-12-12 03:42:27
问题 I am currently using Realm as an offline database in the iOS app. if I were to add support for Realm mobile platform, will it automatically grab all the Realm user data and migrate it to the cloud? Or is there some code that is needed to move the data to the cloud? 回答1: Realm Mobile Platform is not a cloud service but consists of Realm Object Server, a server application you can run on your own (supports various flavors of Linux) and Realm Mobile Database. If you are already using Realm

Data is not updated promptly after adding the information using Realm in Android

时光怂恿深爱的人放手 提交于 2019-12-12 03:35:34
问题 I have implement Realm database in my App. At first I want to show some prelod data. Till now I have only three data here. I have implement a dialog fragment which I used to add data in Realm database. I have read the official documentation of Realm. But the implementation of Adapter class is so complecated for me. Hence I have used RecyclerView.Adapter in my Adpater class. Now the problem I am facing that After adding the information the data is not showing promptly.The data is not upadted

Realm+Gson+Retrofit2 parsing

六月ゝ 毕业季﹏ 提交于 2019-12-12 02:12:06
问题 Retrofit2 response *@Override public void onResponse(Call<List<Category>> call, final Response<List<Category>> response) { switch (response.code()) { case 200: if (response.body() != null && !response.body().isEmpty()) { final List<Category> categoryList = response.body(); Realm.getDefaultInstance().executeTransactionAsync(new Realm.Transaction() { @Override public void execute(Realm realm) { for (Category category : categoryList) { realm.insertOrUpdate(category); } } }); } RealmObjects

How to query List<Int> on Realm Swift

久未见 提交于 2019-12-11 17:42:46
问题 How can I filter out the RealmFilter.objectIds that has a given Int? func delete(ids: [Int]) { let filterResultsToDelete = realm.objects(CRMRealmFilterResult.self).filter("ANY objectIds IN %@",ids) //Crashes } class RealmFilterResult : Object { @objc dynamic var filterId: Int = 0 let objectIds = List<Int>() override static func primaryKey() -> String { return "filterId" } } 回答1: This may not be at all what you want but it was a good exercise. Maybe this will help. Let me re-state what I think

Android how to save realm results with onSaveInstanceState for screen rotation

时间秒杀一切 提交于 2019-12-11 06:36:46
问题 My problem is this: When i open dialog fragment, i send realm and realm results from activity to dialog fragment. I always send different realm results to dialog fragment, depending what i click in activity. This is code in dialog fragment where i receive realm and realmResults from activity, when i click to open dialog fragment: public void setChangeNoteListener(ChangeNoteListener mChangeNoteListener, RealmResults<Drop> realmResults, Realm realm) { mNotelistener = mChangeNoteListener;

How to write to a Realm object server on Ubuntu

爱⌒轻易说出口 提交于 2019-12-10 10:24:58
问题 I have worked through the Realm mobile platform tutorial (link). You create a Swift task app. I was able to get the app and server working correctly on my local mac. I was able to add tasks to the tableview. I then created an Ubuntu 16.04 droplet on DigitalOcean. I managed to get the server running and am able to view the Realm dashboard. The problem is that when I run the app with the new server ip address (the ubuntu instance), I see the 'Add task' pop up but no tasks get added to the

Synchronized Realm - Airplane Mode

好久不见. 提交于 2019-12-09 19:25:43
问题 Can't find anything in the documentation about falling back to the locally cached version of a synchronized realm when eg. the App is started in airplane mode. Am I missing something? 回答1: If the user did log in before (when the connection was available) you can use SyncUser.all() to get a valid authenticated user, but if no user exists a network call to the auth server is required. We are working on adding support for creating a Realm and a User without initial network connection here: https

Different Realm Configurations Appearing in Swift App

蓝咒 提交于 2019-12-08 11:39:53
问题 Swift 3, Xcode 8, RealmSwift 2.0.2, Realm Object Server 1.0 In my app delegate, I have a function that sets my Realm configuration to connect to a remote sync server I have set up. I'm just using a test account to authenticate until I can get the basics of sync working. 1.1.1.1 isn't my real IP address. ;) let username = "test" let password = "test" let address = "http://1.1.1.1:9080" let syncAddress = "realm://1.1.1.1:9080/~/myapp" SyncUser.authenticate(with: Credential.usernamePassword

Anonymous user in Realm Mobile Platform

拟墨画扇 提交于 2019-12-06 06:13:17
问题 Can I connect to a remote Realm without having to login? In Swift, the only way to create a synchronizable Realm is through the syncConfiguration property of a Realm.Configuration . Is there a method for getting an anonymous User so that anyone can connect to the remote Realm? 回答1: Can I connect to a remote Realm without having to login? No, you always need to be authenticated. Is there a method for getting an anonymous User so that anyone can connect to the remote Realm? Yes, via

How to write to a Realm object server on Ubuntu

与世无争的帅哥 提交于 2019-12-06 02:58:06
I have worked through the Realm mobile platform tutorial ( link ). You create a Swift task app. I was able to get the app and server working correctly on my local mac. I was able to add tasks to the tableview. I then created an Ubuntu 16.04 droplet on DigitalOcean. I managed to get the server running and am able to view the Realm dashboard. The problem is that when I run the app with the new server ip address (the ubuntu instance), I see the 'Add task' pop up but no tasks get added to the tableview on the app. The following code adds tasks to the db: try! items.realm?.write { items.insert(Task