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

Added ability to configure whether the location-manager may pause loc… #933

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tanvir-ahmed-m4
Copy link

…ation updates in iOS

Copy link
Collaborator

@bartekpacia bartekpacia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, thanks for contributing.

Please take a look at comments. Also, I'm curious to learn what's the use-case of this feature. Why do you need it?

Comment on lines 19 to 20
location_platform_interface:
path: ../location_platform_interface/
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

revert this

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reverted.

///
/// [interval] and [distanceFilter] are not used on web.
@override
Future<bool> changeSettings({
LocationAccuracy? accuracy = LocationAccuracy.high,
int? interval = 1000,
double? distanceFilter = 0,
bool? pausesLocationUpdatesAutomatically = true,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think true is a good default. What's the current behavior?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bartekpacia
On supported platforms the default value of this property is true; otherwise the default value is false and is immutable.

https://developer.apple.com/documentation/corelocation/cllocationmanager/1620553-pauseslocationupdatesautomatical

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The current behaviour is true by default.

@@ -1,5 +1,5 @@
# Uncomment this line to define a global platform for your project
# platform :ios, '11.0'
# platform :ios, '12.0'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's uncomment this line

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Uncommented

Comment on lines 28 to 31
location_platform_interface:
path: ../location_platform_interface/
location_web:
path: ../location_web/
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

revert these lines

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reverted

@ufoloko
Copy link

ufoloko commented May 6, 2024

on IOS devices, location updates in background are paused automatically depending on activity detected by device, so if you have an app that needs to keep getting locations like a tracking app you need to set this parameter in false.

@tanvir-ahmed-m4
Copy link
Author

on IOS devices, location updates in background are paused automatically depending on activity detected by device, so if you have an app that needs to keep getting locations like a tracking app you need to set this parameter in false.

That is exactly our use-case. The app needs to track the location of the user even when the app or the device is not actively used.

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

Successfully merging this pull request may close these issues.

None yet

4 participants