I have a secure service that's secured by arcgis tokens (ArcGIS for Server 10.2.2). When I start my Android application and load the layer, everything's fine:
ArcGISDynamicMapServiceLayer mapServiceLayer = new ArcGISDynamicMapServiceLayer( mapServiceUrl, null, cred); getMap().addLayer(mapServiceLayer);
The credentials are entered by the user in a login activity and then kept in memory (I need to be able to generate tokens myself to access a server object extension). Problem is when the token expires, the map just vanishes. I guess it's something to do with the layer not being able to authenticate itself again, but I have no idea why.
I tried playing around with the
UserCredentials, only setting username & password, only setting usertoken & tokenserviceurl or setting everything. Nothing helps. Listening to
OnStatusChanged of the layer doesn't tell me anything either, it doesn't fire.
I'd be grateful if anybody could tell me what I'm missing.