I have a delayed call which looks like this:
handler.postDelayed(new Runnable() {
public void run() {
newDeviceBluetooth();
//increment progressbar each thousand millis passed
}
},15000);
However I've got a fully functional progressbar that I want to increase with each second passed by the delay. So what is the approach on this problem, is it a way to implement this?
Appreciate the time you take to answer and help me
So after I had a look at what was possible from the answers I wrote my own class that implements runnable. Is this a possible way to implement this? Think I kinda got it wrong if my gut feeling isn't messing around.
public void run() {
while(counter <= 15){
if(counter < 15){
handler.postDelayed(new Runnable() {
@Override
public void run() {
counter++;
}
}, 1000);
}
else{
sb.newDeviceBluetooth();
}
}
}