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

updateBackgroundNotification appears to be missing #971

Open
Leffe108 opened this issue Jul 28, 2024 · 2 comments
Open

updateBackgroundNotification appears to be missing #971

Leffe108 opened this issue Jul 28, 2024 · 2 comments

Comments

@Leffe108
Copy link
Contributor

Describe the bug
I the past, there used to be a function updateBackgroundNotification to update the content of the sticky notification when background mode is active on Android. This method is still documented, but it appears to not exist in the library.

A quick search in the repo for updateBackgroundNotification only show hits inside documentation files but not in the lib folder.

Expected behavior
I am able to update the background notification title, subtitle etc. using the documented method.

Tested on:

  • Location 7.0.0, in VS Code.
@Leffe108
Copy link
Contributor Author

Here is the documentation page that refers to updateBackgroundNotification:
https://docs.page/Lyokone/flutterlocation/features/notification

It does still use the old way of setting background mode. The new way appears to be:

    final location = Location();
    location.enableBackgroundMode(enable: true);
    location.onLocationChanged.listen((loc) {
      print(loc);
    });

@Leffe108
Copy link
Contributor Author

User work-around
The new name of updateBackgroundNotification is Location().changeNotificationOptions

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

1 participant