-
Notifications
You must be signed in to change notification settings - Fork 252
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
[Help Wanted]: onConnectivityChange, onProviderChange, onPowerSaveChange function not triggering #1431
Comments
Have you actually registered those event-listeners? You did not post any code for them. |
yes I did registered event-listeners both normal functions and headless-events // bg.BackgroundGeolocation.onMotionChange ((p0) => null)
} same for headless switch (headlessEvent.name) {
} |
For few minutes time its works |
Are you registering your listeners before or after calling .ready(config)? |
bg.BackgroundGeolocation.onMotionChange((bg.Location location) async {}) ... the code is like this |
You are supposed to register event-listeners before calling .ready(config) (Why do you “thumbs-up” your own replies?) |
Means if i reopen the app then i need to register event-listeners? again right ? |
You need to register listeners and call .ready(config) each and every time your app is launched from a terminated state. When an app is terminated, the OS completely removes your app from memory, including registered event-listeners. |
Yes thankyou for helping |
Required Reading
Plugin Version
flutter_background_geolocation: ^4.13.5
Mobile operating-system(s)
What do you require assistance about?
The Function is not triggering getting logs but not from flutter ....
its native logs
[Optional] Plugin Code and/or Config
[Optional] Relevant log output
The text was updated successfully, but these errors were encountered: