c# - Firebase in Unity - Disable persistence -


i'm making mobile game android using firebase. game has system allows player play offline , update/retrieve data database depending on saved date-time.

this date-time (written in local file) should same 1 saved in database, , wrote this:

reference.child("users/"+this.id+"/updatedate").setvalueasync(updatedate).continuewith(task => {     if (task.iscompleted) {         debug.log("setting new update date file: "+updatedate);         this.lastupdatedate = updatedate;         writefile();     } }); 

the problem that, if there no internet connection, value gets modified condition below never satisfied happens this: if read value, without internet connection, read "new" date-time, while file still contains "old" 1 (the 1 in database).

i know best solution delete , let offline persistence work, did couple tests , doesn't work on android's build. question following:

is there way disable offline persistence in unity?

because i've tried "firebasedatabase.defaultinstance.setpersistenceenabled(false)" seems function not present in unity's api (it gives me compile errors).

thank assistance!


Comments

Popular posts from this blog

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -