Every time MainActivity becomes visible, an SQSPoller is started for every pairing. Tapping around a bit (back and forth from settings, changing app back and forth) can easily result in 3-4 SQSPoller sets. The connection count is pollers * pairings, so the connections add up quite fast.
Poller lifetime should be managed so that new pollers aren't started if one is already present.
A second consideration would be to up the request timeout from 10 seconds to something higher (20?) in order to lower network activity. I have not played enough with Firebase/GCM to know whether or not relying on it entirely rather than polling (or only polling whenever a GCM message wakes you up) would be a viable strategy.
Every time MainActivity becomes visible, an SQSPoller is started for every pairing. Tapping around a bit (back and forth from settings, changing app back and forth) can easily result in 3-4 SQSPoller sets. The connection count is pollers * pairings, so the connections add up quite fast.
Poller lifetime should be managed so that new pollers aren't started if one is already present.
A second consideration would be to up the request timeout from 10 seconds to something higher (20?) in order to lower network activity. I have not played enough with Firebase/GCM to know whether or not relying on it entirely rather than polling (or only polling whenever a GCM message wakes you up) would be a viable strategy.