Auto Complete Attribute Query

Discussion created by cadgis on Nov 11, 2013
Latest reply on Nov 25, 2013 by tmsbn90

I am working on a landmark(point)  feature layer. I query this layer with a WhereClause so that it brings a single value (name)  from the attributes of each feature. I put this featureset into a  graphics array.

On postexecute,  I get the attribute value from the graphics array  and put it in an adapter. This data adapter is set to an  autocomplete text view. When the user key in any 2  letters,  the attribute values that 'contain' these letters display as drop down so that the user can select and query again for the location to see it in the map.

Everything is working fine except that not all the data that "contains" these letters are displayed but only few. It seems there is a limit  set some where. how can i over come this? Any Idea? Please?

Here is the Code.

private class RunQueryForArray extends AsyncTask<String, Void, Graphic[]>{
 protected void onPreExecute() {
     progress =, "Landmark Search","Please wait....");
 protected Graphic[] doInBackground(String... params) {
  // TODO Auto-generated method stub
  String WhereClause = "NAME <> '0'" ;
  Query query = new Query();
  query.setOutFields(new String[] {"NAME"});
  QueryTask qTask = new QueryTask(featureServiceURL);
  FeatureSet fs = null;
  fs = qTask.execute(query);
  Graphic[] grs = fs.getGraphics();
   return grs;
      catch(Exception e) {
  return null;
 protected void onPostExecute(Graphic[] graphics) {
  List<String> mArray = new ArrayList<String>();
 for (Graphic gr : graphics) {
   String mName = (String)gr.getAttributeValue("NAME");
       ArrayAdapter<String> adapter = new ArrayAdapter<String>(getApplicationContext(), android.R.layout.simple_dropdown_item_1line, mArray);