class LoadContentFromServer extends AsyncTask<Object, Integer, Object>{ @Override protected Object doInBackground(Object... params) { // TODO Auto-generated method stub String url = "http://192.168.1.109/Wow/?Type=go1"; String ckCode = ""; JSONObject data; JSONArray dataset; myArrList = new ArrayList<HashMap<String, Object>>(); try { data = new JSONObject(getJSONUrl(url)); dataset = data.getJSONArray("stock"); myArrList = new ArrayList<HashMap<String,Object>>(); List = new ArrayList<String>(); HashMap<String, Object> map; for (int i = 0 ; i < dataset.length(); i ++){ JSONObject c1 = dataset.getJSONObject(i); map = new HashMap<String, Object>(); myArrList.add(map); map.put("code", c1.getString("code").toString()); publishProgress(i); } } } catch (Exception e) { // TODO: handle exception } return null; }
public void next(View view){ Intent nextScreen = new Intent(getApplicationContext(), FragmentGO.class); if( ){ startActivity(nextScreen); } else{ Toast.makeText(getApplicationContext(),"NOT FOUND",Toast.LENGTH_LONG).show(); } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)