how to establish connection between my arcGIS content map and my android app?

460
3
11-23-2011 11:01 AM
Leela_AnushaNukala
New Contributor
Hi,

I'm developing an android app where I would like to add a map that I created using arcGIS. Let us say if a button is clicked, then the map that I created should be visible as a new activity. Can anyone tell me how to establish a connection between the arcGIS map that I created and my android app?
0 Kudos
3 Replies
ArchanaAgarwal
New Contributor III
Hi,

Could you post the errors that you are getting?

1) Make sure the url that you use while creating a layer, has the fully qualified path name to your server e.g myserver.esri.com or the ip address

2) If you have a service thats on arcgis.com, if its a secure service then the credentials must be supplied.

Please take a look at the helloworld sample from the sdk, it will help you get started. You could replace the url there with your service url.

Thanks
Archana
0 Kudos
ArchanaSahu
New Contributor
Hi,

Could you post the errors that you are getting?

1) Make sure the url that you use while creating a layer, has the fully qualified path name to your server e.g myserver.esri.com or the ip address

2) If you have a service thats on arcgis.com, if its a secure service then the credentials must be supplied.

Please take a look at the helloworld sample from the sdk, it will help you get started. You could replace the url there with your service url.

Thanks
Archana



I have same problem. I have published a map service with mobile access capability on in our arcgis server. In my android application (just modified the URL on helloWorldMap below), I try to consume that service. But, I get connection error (find the attachment). Is it because it is inside an internal server (not accessible from outside, I mean it is not a web server, just an arcgis server). But, the example with http://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer works fine.

Please advice what should I do to access my service through the android application as I new to mobile application development.

public class HelloWorldMapActivity extends Activity {
MapView map = null;

public void onCreate(Bundle savedInstanceState) {
  >>>>>>>>>

  // Add dynamic layer to MapView
  map.addLayer(new ArcGISDynamicMapServiceLayer("" +
  "http://10.129.141.119:8399/arcgis/services/IITBMobileCampusGIS/MapServer"));
 
  >>>>>>>>>
}

Thanks,
Archana
0 Kudos
SaurabhGupta
New Contributor II
0 Kudos