Open rubixhacker opened 1 year ago
Thanks for reporting this! This is potentially for background requests and retries. We would dive more into this behavior.
Hi @qingzhuozhen,
Were you able to investigate this issue further? This past weekend we had a user report that our app used over 45GB of data in the background, and the only thing we can identify as using the data is the Amplitude SDK. We have been instructing users facing this issue to restrict background access of the app, and that stops the background requests from the Amplitude SDK.
Hi @rubixhacker, the 30s interval is already updated in the newer versions, so if you upgrade the SDK version this should be resolved. I am also adding more enforcement on retries to prevent it.
Expected Behavior
After the initial flush on close, the Amplitude SDK should not make additional background requests.
Current Behavior
Background network requests are made every 30 seconds, depending on the device, for one minute to nine minutes. Even with flushEventsOnClose set as false and flushMaxRetries set as zero.
Possible Solution
The issue appears to lie in amplitudeScope, AndroidLifecyclePlugin should cancel all children scopes and then restart all the children scopes when the app returns to the foreground
Steps to Reproduce
Environment