I am trying to code a service that repeatedly checks user location, but shuts off if certain things don't occur within about 3 minutes. I put the shut-the-service-off-logic in onLocationChanged. I just realized that if a user puts a phone on a table and leaves it there onLocationChanged may never be called, and the shutoff logic will never be entered. Is there some other method that could be overridden that gets called every time location is requested? Do I need to manually call onLocationChanged (and is that even a good idea?).
问问题
236 次