Reputation: 43
I want to ask about how to auto refresh the Google Maps?
So i have an activity with radio button inside that user can choose about the interval of the auto refresh. Then I create a class with a map view with class that extends the CountDownTimer. The problem is MyCountDownTimer
has a constructor that display it own interface. Here is my CountDownTimer class.
public class MyCountDownTimer extends CountDownTimer{ public MyCountDownTimer(long millisInFuture, long countDownInterval) { super(millisInFuture, countDownInterval); // TODO Auto-generated constructor stub } @Override public void onFinish() { //do something when finish } @Override public void onTick(long millisUntilFinished) { //do something when the interval is choosen LocationManager.requestLocationUpdate(GPS_PROVIDER, userChoosenInterval, 0, LcoationListener) } }
how can i modify this class so my user can choose their own interval of auto refresh, or is there any other way around of how to auto-refresh the goole maps? thanks.
~Regards~
Upvotes: 3
Views: 2210
Reputation: 957
I've done something similar, allowing users to set the time interval for a particular action. I used the PreferenceActivity to allow the user to set the time, then read from the preferences within my class to set the user defined time interval.
Upvotes: 0