Sudhanshu Gaur
Sudhanshu Gaur

Reputation: 7684

Firebase Trace network call only if request was successful?

I am trying to send network trace in firebase, but I only want to trace if the request was successful, if user network is not present (mobile data/Wi-Fi) then for that case I don't want any trace for this request.

Is there any way by which I can restart trace again, and stop it only if the request is successful?

Just by calling trace.start() again will it work?

Upvotes: 0

Views: 172

Answers (1)

Doug Stevenson
Doug Stevenson

Reputation: 317758

If you want to restart the trace, just create a new Trace object, start it, and let the old one get garbage collected.

Upvotes: 2

Related Questions