Adapt under which conditions a new eipservice.json is fetched
IIRC a new eipservice.json will be downloaded only
- when switching the provider in Bitmask
- during the initial onboarding (Bitmask + Custom Branded)
- if the setup of one gateway failed and the next one was selected (Bitmask + Custom Branded)
the latter approach helps if a gateway was deleted (gateway is not more reachable and thus the list of gateways needs to be updated), but currently there's no way to detect newly added gateways.
I'm hestiant with downloading the eipservice.json each time the user connects, as it will drain the mobile's data usage without much benefit. What could be done is a timestamp based approach. Each Week, after successfully establishing the connection, a new eipservice.json will be fetched. If it fails for some reason the result will be ignored, if it succeeds the existing eipservice.json will be replaced.