AddLayer after OnCreate NOT working. BUG?

Discussion created by jessica.sena on May 13, 2013
Latest reply on May 29, 2013 by doneill-esristaff

I'm experimenting a weird behaviour with map.addLayer() method and I'm not sure if it's a bug or I'm missing something.

The thing is that in some Android devices (i.e. Samsung Galaxy Ace) when I add layers to the map after the OnCreate method these layers are not showing in the map, but if I add the layers during the onCreate method, these layers are showing correctly.

I could guess that you can only use the addLayer method on the OnCreate process, but it has no sense because as I say, this only happens in some Android devices... and that's why I'm not getting which is the exact problem.

These are two examples about 2different ways of how I add the layers:

WMSLayer wms = new WMSLayer("",SpatialReference.create(23031));


baseLayer.setVisible(false);//I set to not visible the current layer added to the map
WMSLayer wms = new WMSLayer("http://mapcache.icc.catmapbasesservice?",SpatialReference.create(23031));

Anyone has noticed the same? Anyone from ESRI could try to reproduce the problem?

Thanks in advanced,