There is such a JSON info{"id":"25","name":"Черновицкая область"} I parsed it and the region is inserted into autocomplettextview
Log.d(TAG,"AutoComplete jsonArray"+ jsonArray); for(int i=0;i<jsonArray.length();i++){ JSONObject info = jsonArray.getJSONObject(i); Log.d(TAG,"AutoComplete info"+ info); String id=info.getString("id"); String name=info.getString("name"); list_name.add(name+id); } Log.d(TAG,"List"+ list_name); String[] region = list_name.toArray(new String[0]); String[] id = list_id.toArray(new String[0]); Log.d(TAG,"Array"+Arrays.toString(region)); ArrayAdapter<String> adapter = new ArrayAdapter<String>(AutoComplete.this, R.layout.autocompletephone,region); autoCompleteTextView.setAdapter(adapter); How to compare and send NOT area
@Override protected Map<String, String> getParams() throws AuthFailureError { Map<String, String> parameters = new HashMap<String, String>(); parameters.put("region", autocompletextview.getText().toString()); and id depending on the selected area
@Override protected Map<String, String> getParams() throws AuthFailureError { Map<String, String> parameters = new HashMap<String, String>(); parameters.put("id", ?????);