public RDBRObj(string u, string _dev) { dev = _dev; uid = u; obj = new ReactiveProperty <T>(loadData()); RealtimeDBFactory.get().initDoneCB().add(init); }
private void subscribeData() { string dataPath = getPath(DATA_PATH); Debug.Log("subscribeData:" + dataPath); RealtimeDBFactory.get().subscribe(dataPath, s => { replaceData(s); dataSubscribed = true; onFetchedCB.done(); }); }
private void post() { string nShal = getHash(); string oldSha1 = rObj.loadHash(); if (nShal.Equals(oldSha1)) { return; } Map <string, object> _da = new Map <string, object>(); _da.put("hash", nShal); _da.put("data", obj); RealtimeDBFactory.get().putJson(rObj.getPath(""), _da); postedCB(obj); }