Leanplum / Leanplum-Android-SDK

Leanplum's integrated solution delivers meaningful engagement across messaging and the in-app experience.
https://www.leanplum.com
Apache License 2.0
46 stars 40 forks source link

RequestSender refactoring #421

Closed hborisoff closed 4 years ago

hborisoff commented 4 years ago
What Where/Who
JIRA Issue SDK-52
People Involved @hborisoff

Implementation

RequestSender is refactored to provide only one public methods:

RequestSenderTimer is introduced to cycle every 15min and send the collected requests including the 'heartbeat' request:

If there is a database exception it is added to RequestSender.localErrors list and send on next sync of saved requests instead of the real requests. Currently no logic for recovery or dropping the db table.