Home > database >  Is it possible to create timeouts for Firebase?
Is it possible to create timeouts for Firebase?

Time:08-14

I'm developing an Android application using Firebase Authentication, Firebase Realtime Database, and Firebase Storage.

Is it possible to set timeouts whether it would be programmatically or directly on Firebase for getting or setting data for any of the above three Firebase products? I don't want users to be stuck in an endless loop waiting for their Firebase data because their connection might be weak nor do I want my Android application to be constantly pinging Firebase for data forever.

CodePudding user response:

There are no timeouts that can be configured for the Android SDK. In general, they will automatically retry in the background so that you can have the maximum chance that they will succeed without having to implement retry code for yourself. If a call fails, it will fail because the request is simply not possible (for example, a security rule violation or bad arguments).

You can see all of your options in the API documentation:

The only product that does have a timeout is for Cloud Functions callable functions:

See also:

  • Related