Skip to content

delay10Seconds timer not set/reset when entering background #5

@ddanielczyk

Description

@ddanielczyk

Hi

I am trying to user your code in my app, and found our few problems:

  1. I changed the main timer from 1 minute to 5 mintes, delay timer stays at 10s. When you start app, it update locations and finish after 10 seconds. Then put app to background, you it will start updating location again - and will update them in background for more than 4 minutes, when main timer reset again. I think you should not call [locationManager startUpdatingLocation] in -applicationEnterBackground. Is this a bug or you wanted it this way for some reason? Maybe it was just not that obvious with 1 minute timer, but with longer timer it is a problem. If I set timer for 1 hour, it would constantly update location for one hour after going to background.
  2. Wouldn't it be better if instead of creating separate timer for updateToServer, just put call to [self updateToServer] in -stopLocationDelayBy10Seconds ? At this point you always has the most current user location.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions