GithubHelp home page GithubHelp logo

Comments (5)

a-maurice avatar a-maurice commented on May 26, 2024

Unfortunately, currently there is no way to cancel the tasks from Auth and Database. The best you could do now is handle it in the task completion, undoing whatever action is needed if you want to.

from firebase-unity-sdk.

jmarisalandanan avatar jmarisalandanan commented on May 26, 2024

Thanks for the answer! That could work, how ever in the case of Timeout because of poor/no network task wouldn't get completed right? Any ideas on how to handle this properly? I'm currently thinking of possible workarounds for this, just asking in case you have any insights on how to approach this matter.

from firebase-unity-sdk.

chkuang-g avatar chkuang-g commented on May 26, 2024

@jmarisalandanan
AFAIK, Database on Android would attempt to reconnect back to the server in poor/no network condition. And it will fail the Task if it retried too many times. I think Auth should have similar mechanics.

There is no proper way to actually implement timeout and cancel operation from C# level. Even you throw away the Task you got, in Android SDK level, it will still attempt to send the request until it gave up.

Shawn

from firebase-unity-sdk.

pistoleta avatar pistoleta commented on May 26, 2024

hehe this was exactly was I was looking for, it's a shame it's not possible.
pistoleta.

from firebase-unity-sdk.

kimcatsq avatar kimcatsq commented on May 26, 2024

Will we have the ability to cancel the task? or set a shorter timeout?

I know I can check if Application has connectivity before calling the Firebase functions. On mobile losing connection is quite common in spotty areas. Currently in my editor, the firebase cloud function call is taking 2min 30sec to time out. It's way too long for players to wait. I could time out the UI, force player to go back 1 screen and let the task run in the background. But if player trigger the call again before the timeout, it would eventually crash Unity. :-(

from firebase-unity-sdk.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.