Git Product home page Git Product logo

apscheduledlocationmanager's People

Contributors

huguesbr avatar paleksandrs avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

apscheduledlocationmanager's Issues

Get Imedeitly location

hi
my app have on/off button i want when app is on get location Imedeitly to send to server "app is running" . how to get Imedeitly location?
thank

Stop Updating location from different View Controller

I'm trying to stopUpdating location from a different view where I start updateLocation but the 'Updatelocation' is still running. Is it possible to turn it off ? and how because I tried

if self.manager.isRunning { self.manager.stopUpdatingLocation() } self.present(alertController, animated: true, completion: nil) }

Timers not working if device is locked

Hello,

I tried to use this solution in a demo application. It works fine when I put the app in background, but as soon as I lock the device, I notice that the timers are not fired anymore at regular and defined interval. If I specify a time of 60 seconds, and I lock the device, the app is checking for a new location with a random duration between 5 and 15 minutes.

If I play a fake sound in background, the app behaves as expected and the timers correctly fire and restart the location manager. But I don't want to use this hacky solution...

Any idea why the timer is not running when device is locked?

Thanks,
Axel

LocationManager can't be stopped

In your Demo Project, I changed just 1 line of code:

manager.startUpdatingLocation(interval: 2, acceptableLocationAccuracy: 100)

I ran the Demo App and clicked the stop button when the App collected more than 5 location record, then I found that the App didn't stop, it still push new location records to the text view.
But when I click the stop button right after a new record pushed onto the screen, sometimes it can be stopped successfully.
I added some debug print code to the functions like startWaitTimer(), stopWaitTimer(), startCheckLocationTimer() and stopCheckLocationTimer(), then found that if I click just before the wait timer starts, it can be stopped successfully, but once the wait timer starts, the stoptUpdatingLocation() function can't truly stop the timer loop.

Using didUpdateLocations to send location to server

I am use the didUpdateLocations func to send the data to my firebase server. Before I sent data to the server I just printed the users location to the console in 5 second intervals. Everything was working fine however once I stopped printing the current location and instead sent it to firebase the didUpdateLocations func seemed to be called a 1000 times per second rather than every 5 seconds why is this?

Location with delay of 6 Second?

I want to get location after every 60 Seconds periodically, Everything working fine but, I have got location after 66 Seconds instead of 60 Seconds. Location accuracy is 100. I was also tried by using lower accuracy but no luck.

First Location Time: 12:52:57
Second Location Time: 12:54:03
Third Location Time: 12:55:09
Fourth Location Time: 12:56:15
Fifth Location Time: 12:57:21........so on

App gets suspended in background and stops updating location after 10min

I used this for getting the location in background but when app goes to background it only updates location for 8-10min after that if won't event update or give any location changes something is not keeping app alive I guess it is suspended I also tried with example app

manager.startUpdatingLocation(interval: 10, acceptableLocationAccuracy: 100)

APScheduledLocationManager is not called when n = 20 or higher

when
self.manager.startUpdatingLocation(interval: 20, acceptableLocationAccuracy: 100)
and the app enters background mode, the APScheduledLocationManager won't run

but when
self.manager.startUpdatingLocation(interval: 2, acceptableLocationAccuracy: 100)
the APScheduledLocationManager works nicely

Why?

Execution stops after some hours

I add an APScheduledLocationManager in my project, it works ok, but I have realized that its stops after some time. The last location is registered about three hours after the timer was fired.
In that three hours I moved with the device. I stopped to move and later, 8 hours later, the background execution was not working. I don't know if it stops after three, five or even more hours

Any idea about that?

I am using an iPhone with iOS 12.1.4, and the code is the next:

var manager = APScheduledLocationManager(delegate: self)
manager.startUpdatingLocation(interval: 150, acceptableLocationAccuracy: 50)
func scheduledLocationManager(_ manager: APScheduledLocationManager, didUpdateLocations locations: [CLLocation]) { //send location }

Thanks in advance

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.