Taking Too Much Time To Get Large Json Data From Server Using Php Volley Library
I am developing an app that sync data from PHP server using volley library.I am receiving json array response from php. When response is little, it is working perfectly. But proble
Solution 1:
If the length of file is large, you should run this method on background. try this code :
@Override
public void onResponse(String response) {
new Thread(new Runnable() {
@Override
public void run() {
JSONArray arr = new JSONArray(response);
int len = arr.length();
for (int i = 0; i < len; i++) {
//write your parsing logic here
}
}
}).start();
}
Post a Comment for "Taking Too Much Time To Get Large Json Data From Server Using Php Volley Library"