0

I have one simple question: How can I change variables on picture below (INTERVAL and FASTEST_INTERVAL): enter image description here

using button? I tried with this: enter image description here

, and Toast message appears, but I don't think variable is really changed.

Actually, all I want is to change INTERVAL within this: enter image description here

with a simple click of a button.

5
  • Does the toast message have the new increased value or no? Commented May 13, 2015 at 15:38
  • Yes, it does, Pedja. Commented May 13, 2015 at 15:55
  • 1
    Then call mLocationRequest.setInterval(INTERVAL) again with new updated variable. Commented May 13, 2015 at 15:59
  • Like so? It doesn't work. Again, just within a Toast message is changed... Commented May 13, 2015 at 16:18
  • Looking at stackoverflow.com/questions/23423293/… and developer.android.com/reference/android/location/… might help Commented May 13, 2015 at 16:33

1 Answer 1

1

After you update the interval just call the requestLocationUpdates function again to refresh it.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.