Database Offline Capabilities
Can you please give example with offline support? Just set_persistence_enabled before creating any instances of DatabaseReference doesn't help. Feature query/set freezes with kFutureStatusPending status.
@formatCvt which platform are you testing on?
@stewartmiles android (firebase sdk 4.2.0, cocos2d-x 3.14.1, ndk14b, database sample project from this repo)
@formatCvt thanks we'll get someone to take a look.
@stewartmiles any news?
Hi,
Looking into this, there seems to be an issue with disk persistence and the way GetValue is implemented (using single value listener). Does it work if you are online and GetValue first, then go offline and GetValue on the same path again?
Thanks,
Jon
Nope. It's not working until connection is back.
Here is my changes https://github.com/formatCvt/cocos2dx-cpp-sample/commit/a73f01dca2e7e9e68507918a60983d087b4a86d5 without this authentication fails when device is offline.
Steps to reproduce:
- Start example with internet connection
- Set key "a" and value "a"
- Press "Set" (wait until request successful)
- Press "Query"
- Close app and stop internet connection
- Start example without internet connection
- Set key "a" and value "a"
- Press "Query"
Feature
query_future_freezes withkFutureStatusPendingstatus until connection is back.
any news?
Update firebase sdk up to 4.3.0 doesn't help
Update firebase sdk up to 4.4.0 doesn't help
With 4.4.1 query is working, but set still freezes until connection is back.