Almoullim / background_location

Flutter background location plugin for Android and iOS
https://pub.dev/packages/background_location
Other
224 stars 236 forks source link

Android foreground notification only works in debug mode #108

Closed bmason8 closed 1 year ago

bmason8 commented 3 years ago

Is anyone else having this issue? I'm not sure when it started but the foreground notification won't start when in release mode. While running in debug it works just fine! Any help would be greatly appreciated!

CompileSdkVersion: 30 minSdkVersion: 23 targetSdkVersion: 30 ext.kotlin_version = '1.5.21' classpath 'com.android.tools.build:gradle:4.1.0'

bmason8 commented 3 years ago

I just solved my own issue and thought I'd comment on what happened instead of deleting this right away, in case it helps someone else. I had recently updated my Android icon so it was round and not the circle in a square look. In the process the default @mipmap/ic_launcher was removed and replaced with @mipmap/ic_launcher_round so when I went to launch the notification and pass in the icon, it was trying to reference an image that wasn't there anymore. I guess in debug mode it fails a little bit more gracefully and just provides a default square instead of not launching the notification at all.

MoralCode commented 1 year ago

issue seems resolved