Android: Google Maps auto update

I want to ask how to automatically update Google Maps?

So, I have activity with a switch inside this user who can select the auto update interval. Then I create a class with a map view with a class that extends CountDownTimer. The problem is that it MyCountDownTimerhas a constructor displaying its 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 change this class so that my user can choose their own auto update interval, or is there any other way to automatically update goole maps? thank.

~ Hello ~

+3
source share
1 answer

, . PreferenceActivity, , , .

0

Source: https://habr.com/ru/post/1755300/


All Articles