1

I would like to use Firebase for analytics on iOS and Android app. My users are most of the time in remote area with poor or no network. I would like to optimize battery life so I don't want firebase to create web requests all the time. Is there a way to dispatch data only on command ? I would like to have the same behaviour than google analytics with the analytics.setLocalDispatchPeriod(0); and send data only when the user is connected to wifi for example.

Frank van Puffelen
  • 565,676
  • 79
  • 828
  • 807
Philiz
  • 429
  • 5
  • 25
  • Firebase Analytics batches the events and only tries to send them to its servers periodically (once an hour, iirc). – Frank van Puffelen Jan 30 '17 at 09:37
  • Ok thanks. But would be nice to have control on this period. – Philiz Jan 30 '17 at 10:23
  • 1
    Sounds reasonable, so you might want to [file a feature request](https://firebase.google.com/support/contact/bugs-features/). I'd also recommend reading: https://firebase.googleblog.com/2016/11/how-long-does-it-take-for-my-firebase-analytics-data-to-show-up.html – Frank van Puffelen Jan 31 '17 at 04:11

1 Answers1

4

The SDK already tries to minimize the upload interval times to one per hour to avoid draining battery. If there is any problem with the network, it won't retry immediately but in hours later or back-off if needed. It also has several methods to optimize data latency so it won't be good to freely control the scheduling system.

adbitx
  • 2,019
  • 8
  • 13