I have the following sequence of events. Unable to make them run in that sequence.
This is the way it should work:
Onclick action in MainActivity opens Attendance activity Before the user clicks on Attendance, the Location from Network / GPS to be collected Load the results to public variables and compile a URL string On Click, Do a POST with the URL string
If Internet is not available, store the URL locally Once Internet is available OnClick, dump out the stored URLs in sequence, and process the current URL
What's happening:
The sequential tasks are not occurring - I'm using the code below to sequence them.
new CountDownTimer(5000, 1000) {
@Override
public void onTick(long millisUntilFinished) {
// do something after 1s
call networklocation();
}
@Override
public void onFinish() {
// do something end times 5s
call gpslocation();
}
}.start();
Then call another CountDownTimer with the next events and so on.
Can someone please help?