-
Notifications
You must be signed in to change notification settings - Fork 231
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
"Location Services Activated" popups continuouslly in system tray. #83
Comments
That’s correct. #getCurrentPosition launches a foreground-service to ensure completion of the request. |
then please give me an alternate to hit my updateLocation api without that popup. |
Why are you executing #getCurrentPosition at “high frequency”? |
if ((state.profile.provider ?? false) && (state.profile.status ?? 1) > 1 ){
This is the one i have to perform.Just a Profile condition checking.Suggest me if you get an idea. |
Actually popup occurs wherever i call getcurrentPostion . So please give me atleast one solution for which "Location Service activated" should not occur. |
There is no solution. You can edit the content of the notification as desired though with Notification config. |
I am also, getting the same issue @christocracy, it is very annoying to see it pop up very frequently in the system tray. Is there any way to minimize/limit the occurrence to 1 per day or something. Otherwise, it will drive the user mad and user at the end may uninstall the app. Please assist @christocracy |
Why are you executing |
@nikhiljuneja Show me the config you're using. |
Hi sir,
As many times my getcurrentpostion called it pops up accordingly.
I have also used "usesignificantchangesonly:true" but its not stoping.
Your Environment
flutter doctor
):PASTE_YOUR_CODE_HERE
bg.BackgroundGeolocation.start();
// bg.BackgroundGeolocation.onLocation(_onLocation);
bg.BackgroundGeolocation.onMotionChange(_onMotionChange);
bg.BackgroundGeolocation.onActivityChange(_onActivityChange);
bg.BackgroundGeolocation.onProviderChange(_onProviderChange);
bg.BackgroundGeolocation.onConnectivityChange(_onConnectivityChange);
//bg.BackgroundGeolocation.onNotificationAction(_onNotificationAction);
bg.BackgroundGeolocation.ready(bg.Config(
// debug: true,
reset: true,
logLevel: bg.Config.LOG_LEVEL_VERBOSE,
desiredAccuracy: bg.Config.DESIRED_ACCURACY_NAVIGATION,
distanceFilter: 100,
// locationUpdateInterval: 5000,
stopOnTerminate: false,
// preventSuspend: true,
startOnBoot: true,
useSignificantChangesOnly: true,
// heartbeatInterval: 2
)).then((bg.State state) {
bg.BackgroundGeolocation.stop();
print('[ready] ${state.toMap()}');
setState(() {
_enabled = state.enabled;
_isMoving = state.isMoving;
});
}).catchError((error) {
print('[ready] ERROR: $error');
});
. getcurrentpostion method -->
Expected Behavior
"location services activated" poping continuouslly
Actual Behavior
should not behave like above.
Steps to Reproduce
Context
I have tried "useSignificantChangesOnly: true,"
Debug logs
Logs
The text was updated successfully, but these errors were encountered: