flutterlocation icon indicating copy to clipboard operation
flutterlocation copied to clipboard

How to disable notifications while running in the background

Open whgkstmf opened this issue 2 years ago • 1 comments

Location service notifications turn on when running location service in the background, is there a way to turn it off?

Of course, I know there is a changeNotificationOptions function in the location library that modifies notifications when running in the background, but I can't turn off notifications with that, so I'm asking if the library currently provides the ability to turn off notifications.

If not, should I touch the location library source myself?

whgkstmf avatar Feb 15 '24 02:02 whgkstmf

AFAIK there is currently no way to disable the notification.

e.g. here is the android method call handler.

https://github.com/Lyokone/flutterlocation/blob/master/packages/location/android/src/main/java/com/lyokone/location/MethodCallHandlerImpl.java#L192

So right now you can't disable the notification

Koboo avatar Feb 18 '24 16:02 Koboo