I'm using Android Mapbox SDK 7.0.0 and I give the SDK an authentication token with the given method: Mapbox.getInstance(applicationContext, mapboxToken)
My authentication token, mapboxToken
, is working fine and the map is displayed.
But, how to detect when the authentication token expires?
I want to refresh this authentication token from time to time, but this also means that the Android app has to detect expired tokens in order to ask for a new one.
If no tile is in cache, then the MapboxView
triggers the OnDidFailLoadingMapListener
but if there are some tiles in cache, the map is loaded correctly, new tiles are not loaded and no callback is triggered.