Add rollbar-android option to detect when the network is unavailable and suspend sending occurrences.
The ConnectivityDetector depends on OS features so it has been tested manually, on-device and on emulators
from API 16 up to 30.
Maintaining backwards compatibility was factored heavily into the choice of implementation.
Changes that were avoided in order to maintain compatibility:
Changing Sender.send to return a value or future representing the outcome of sending the payload. We are using the existing sender listeners instead
Modifying the queue item type to leave the bookkeeping variable sendAttemptCount out of the payload class (the sender queue is user configurable so some SDK users might be using their own queue implementation)
Adding "transactional-like" queue semantics to rollback the poll action instead of reenqueing when a payload must be retried (same reason as above)
Type of change
[ ] Bug fix (non-breaking change that fixes an issue)
[x] New feature (non-breaking change that adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
Related issues
[ch91148]
Checklists
Development
[x] Lint rules pass locally
[x] The code changed/added as part of this pull request has been covered with tests
[x] All tests related to the changed code pass in development
Code review
[x] This pull request has a descriptive title and information useful to a reviewer. There may be a screenshot or screencast attached
[x] "Ready for review" label attached to the PR and reviewers mentioned in a comment
[x] Changes have been reviewed by at least one other engineer
[x] Issue from task tracker has a link to this pull request
Description of the change
Add rollbar-android option to detect when the network is unavailable and suspend sending occurrences.
The ConnectivityDetector depends on OS features so it has been tested manually, on-device and on emulators from API 16 up to 30.
Maintaining backwards compatibility was factored heavily into the choice of implementation.
Changes that were avoided in order to maintain compatibility:
Sender.send
to return a value or future representing the outcome of sending the payload. We are using the existing sender listeners insteadsendAttemptCount
out of the payload class (the sender queue is user configurable so some SDK users might be using their own queue implementation)Type of change
Related issues
Checklists
Development
Code review