public void onSuccess(String response){ try{ JSONObject obj = new JSONObject(response); //Toast.makeText(getApplicationContext(), "Success", Toast.LENGTH_SHORT).show(); if(obj!=null){ JSONArray data = obj.getJSONArray("CheckDuplicateSupplierRegistration"); for(int i=0;i<data.length();i++)> { JSONObject user = data.getJSONObject(i); String sid=user.getString("ID"); String name=user.getString("sSubscriberName"); if(sid.equals(name)){ //navigate(); //name=user.getString("sSubscriberName"); Toast.makeText(getApplicationContext(), "Success", Toast.LENGTH_SHORT).show(); } } } else{ Toast.makeText(getApplicationContext(), "Try Again", Toast.LENGTH_SHORT).show(); } }catch(JSONException e){ Toast.makeText(getApplicationContext(), "Error Occured [Server's JSON response might be invalid]!", Toast.LENGTH_LONG).show(); e.printStackTrace(); } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)