[Solved] Receive json in android


JSONArray json = new JSONArray(result);

First calculate the length of the array!

int len=json.length();
String[] str=new String[len];
for(int i=0;i<len;i++)
 {
  str[i]=json.get(i).toString();
 }

First add a spinner to your activity

Spinner s=(Spinner)findViewById(R.id.Spinner);
ArrayAdapter adapter=new ArrayAdapter(this,android.R.layout.simple_spinner_item,str);
s.setAdapter(adapter);

solved Receive json in android