Created
December 11, 2014 07:10
-
-
Save guodong1111/bcdb2f8d74777003e0e2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RequestQueue mQueue = Volley.newRequestQueue(this); | |
String url = CommonUtilities.API+"portal?v=40&mso="+FliprXApplication.mso+"&lang=zh"+"&time="+new Date().getHours(); | |
StringRequest stringRequest = new StringRequest(url, | |
new Response.Listener<String>() { | |
@Override | |
public void onResponse(String response) { | |
try{ | |
setInfos = CSV_Parse.parseToSetInfo(response); | |
if(navigationDrawerFragment != null){ | |
navigationDrawerFragment.setSetInfos(setInfos); | |
} | |
for(SetInfo setInfo:setInfos){ | |
getChannel(setInfo); | |
} | |
}catch(Exception e){ | |
Toast.makeText(getApplicationContext(), "Wrong id", Toast.LENGTH_SHORT).show(); | |
} | |
} | |
}, new Response.ErrorListener() { | |
@Override | |
public void onErrorResponse(VolleyError error) { | |
Toast.makeText(SetInfoActivity.this, "onMissConnect: "+error.getMessage(), Toast.LENGTH_SHORT).show(); | |
} | |
}); | |
mQueue.add(stringRequest); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment