I have a niche application that needs to send a server its location every few seconds. (Don’t worry about a mobile phone’s battery life). How would I make a thread or something execute every few seconds? I have a gpslistener but the name of its subclass is "onlocationchanged" which seems to only want to provide information if the location changed, I will need an updated location sent to the server every time though on an interval that I define
How would I do this?
insight appreciated
Place this in
onCreateof a service.REFRESH_TIMEis the frequency or time in milliseconds when therunrepeats itself.