-
-
Notifications
You must be signed in to change notification settings - Fork 835
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
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this 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?
packages/location_web/pubspec.yaml
Outdated
location_platform_interface: | ||
path: ../location_platform_interface/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
revert this
There was a problem hiding this comment.
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, |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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' |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Uncommented
packages/location/pubspec.yaml
Outdated
location_platform_interface: | ||
path: ../location_platform_interface/ | ||
location_web: | ||
path: ../location_web/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
revert these lines
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reverted
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. |
…ation updates in iOS
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. |
…ation updates in iOS