Android SDK Identify Sample?

Discussion created by waringt on Nov 29, 2012
Latest reply on May 7, 2014 by luisalejandroduarte

I am just getting started with the Android SDK and am working through some of the samples. I have gotten to the Identify sample and am a little bit confused about what I am working with. I subsequently have a couple of questions that would help me in my mission.

Am I working with the correct version of the Identify sample? I am working with the samples that I downloaded with ArcGIS for Android 2.0.0. The help files for this sample (http://help.arcgis.com/en/arcgismobile/10.0/apis/android/help/#/Identify_task_sample/01190000001w000000/) describe a scenario that explores recent earthquakes. However, when I build and run my sample I get a map of the 50 states. Is the earthquake scenario the most up to date and if so where do I get a working copy of the code for the earthquake scenario?

When I run the Identify sample and click on a state, the popup spinner always lists a state that is different than the state I clicked on. For instance, If I click on Texas, I get New Mexico in my popup. When I click on the spinner dropdown, I get a list with Texas and all of the nearby states. Is this the intended result? Is there any way to make the identify point more accurate? I would like to have only one result returned when I click on a state.

Lastly when I swap out the sample map service with a parcel service of my own, I am unable to get any results in the popup. I am swaping out the URLs in the following locaitons:

In onCreate:
ArcGISTiledMapServiceLayer layer = new ArcGISTiledMapServiceLaye("http://services.arcgisonline.com/ArcGIS/rest/services/Demographics/USA_Average_Household_Size/MapServer");

and in onPreExecute:

mIdentifyTask = new IdentifyTask("http://services.arcgisonline.com/ArcGIS/rest/services/Demographics/USA_Average_Household_Size/MapServer");

My service supports the Identify as a supported opperation. Is there something I am missing?

Any hints, tips or nudges in the right direction will be greatly appreciated.

Best Regards,