HelloI am a novice in Android and got Eclipse Kepler configured with ArcGIS Android Runtime SDK 10.2.2. I have also configured Google ADT and all that is needed to run the HelloWorld example. I am using ArcGIS Server 10.2 Standard Edition on Windows Server.I published a dynamic map service but did NOT enable the mobile access. I am told that it is NOT mandatory to enable the Mobile Access for a mapservice for simple viewing . Correct me if i am wrong. I published this Dynamic Map Service to Mobile Content server and able to access this from my SmartPhone using ESRI apps downloaded from Google Play.Later I modified the HelloWorld example to point to a DynamicMapService. I included the simple code snippet below:Pls note that i had replaced the servername/ipaddress with the placeholder tag.
super.onCreate(savedInstanceState);
// After the content of this Activity is set, the map can be accessed from the layout.
mMapView = new MapView(this);
//Envelope
Envelope env = new Envelope();
env.setCoords(21398, 14277.517116, 21528.702632172, 14340.018);
mMapView.setExtent(env);
//Dynamic Map Service layer
mMapView.addLayer(new com.esri.android.map.ags.ArcGISDynamicMapServiceLayer("http://<ipaddress>:6080/arcgis/rest/services/Draft/CEM1/MapServer"));
setContentView(mMapView);
When i access the URL of the map server in a browser in my laptop it works without issues. However when i run the Android app in Eclipse - installed in my laptop - the Emulator starts, the apk file is getting installed but when the activity starts i am getting the error:org.apache.http.conn.ConnectTimeoutExceptionHowever i am able to access this Mapservice from ArcMap in my laptop and my smartphone without issues. I changed the Servername to IPAddress and back. When i click the Android App it opens and displays a black screen. However the LogCat displays the issue as shown in this message.[ATTACH=CONFIG]32352[/ATTACH]I am not sure where this is going wrong. I checked the following:
- Map Service is accessible from ArcMap and Smartphone
- Extent is valid and has been verified in ArcMap
Can anyone help me in figuring out the problem? Thanks in advance.RegardsGovind