Reputation: 7684
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
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