For the Karma Android (and iOS app) we need to update the hotspot status every second. We'll consider the exact implementation a detail suffice to say that every second some callback needs to be triggered that performs the necesary update. I'm writing this gist to try and explain what I'm trying to do and to get feedback on my approach from experienced developers.
- The main activity has an instance of a
HotspotStatusUpdaterclass (initialize inonCreate) - In
onResumeI callhotspotStatusUpdater.startUpdatingHotspotStatus(this);(thisis a callback that implements theHotspotStatusCallbackinterface) - In
onPauseI callhotspotStatusUpdater.stopUpdating();