what i'm trying to do is while loop with delay of 15 seconds and inside the loop i want to execute volley request .. the loop is working but with no delay
this is my code : (client2 is the volley request method )
new Thread(new Runnable() {@Override
public void run() {
while (h < taxiidlist.size() && assined == false && requested == true) {
handler2.post(new Runnable() {@Override
public void run() {
client2(user.id, taxiidlist.get(h));
h++;
}
});
try {
Thread.sleep(15000);
} catch(InterruptedException e) {
e.printStackTrace();
}
}
}
}).start();