Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting unwanted hundreds of point acquisitions on iOS #55

Closed
alexlopespereira opened this issue May 4, 2020 · 8 comments
Closed

Getting unwanted hundreds of point acquisitions on iOS #55

alexlopespereira opened this issue May 4, 2020 · 8 comments

Comments

@alexlopespereira
Copy link

alexlopespereira commented May 4, 2020

I have an app which is working fine on Android but it is calling the callback functions hundreds of times at each second.

How could I prevent such a behaviour?
Shoud I update the UI in order to dismiss the trigger event?

I'm using this code for setup:

BackgroundLocator.registerLocationUpdate(
      LocationBackground.callback,
      androidNotificationCallback: LocationBackground.notificationCallback,
      settings: LocationSettings(
        notificationTitle: "App",
        notificationMsg: "Tracking location",
        notificationIcon: 'ic_background',
        wakeLockTime: 20,
        autoStop: false,
        interval: 60 * 15,
      ),
    );
@alexlopespereira
Copy link
Author

alexlopespereira commented May 5, 2020

I thought I made some mistake implementing the setup for iOS, but it doesn't seems to be the case. Because I've download the example project from here https://github.com/rekab-app/background_locator/tree/master/example and the same behavior happens on iOS (many many calls to the callback).

Look at the example project running on iOS and take a look at the interval between acquisitions. I scheduled for an interval of some minutes.

image

How could we prevent this from happening?

@mehdok
Copy link
Collaborator

mehdok commented May 6, 2020

Are you testing on emulator or real device?
Please give me all the information about testing environment, Include Xcode version, iOS version, real device name or simulator, etc.

Also there is GpsiesTrack.gpx in the example project, Are you sure that you are not using it as mock location?

@alexlopespereira
Copy link
Author

Hi @mehdok I'm testing on a real device, iPhone X, iOS13, Xcode 11.4.1

I'm quite sure I'm not using the GpsiesTrack.gpx file, because these points in the image are the points where I was at the time I ran the app.

@mehdok
Copy link
Collaborator

mehdok commented May 10, 2020

This behavior from a real iOS device is really strange. I tried to replicate this situation with iPhone7 and iPhone XS Max, But the they act very normal.

@alexlopespereira
Copy link
Author

alexlopespereira commented May 10, 2020 via email

@wemersonrv
Copy link

wemersonrv commented May 13, 2020

@alexlopespereira this problem still happens?

Here i have the same issue... So get the example project and run and receive a lot of captures too, just like you.

I thing this problem is the cause of of another issue i had a couple of days ago about high battery consumption ... this issue: #51

Now all makes sense. Over-capture, of course, is pushing the battery a lot. Now it's only a matter of time before Apple screams! 😭 😂 😇

@mehdok
Copy link
Collaborator

mehdok commented Jun 4, 2020

@alexlopespereira @wemersonrv Please test the new version to see if the problem is gone or not.

@mehdok
Copy link
Collaborator

mehdok commented Aug 17, 2020

This should be fixed by #87 ;

@mehdok mehdok closed this as completed Aug 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants