Open GaelleJoubert opened 3 years ago
Strange. I'm explicitly setting the WakeLock not to be referenced counted:
https://github.com/JulianAssmann/flutter_background/blob/8f2dec361990d0e119701fd191ad641dc1d664f7/android/src/main/kotlin/de/julianassmann/flutter_background/IsolateHolderService.kt#L77
So one call to release()
should release the WackeLock no matter how many acquire()
calls there were prior to it.
This bug should not be problem for your app though.
Which version did you use and is the problem fixed in the latest version?
I'm still experiencing this warning with latest version, and in real samsung devices, it used 100% cpu and freeze hang the app, was that had anything to do with this?
Hello, I'm using this plugging to run a function (bluetooth scan) in background, even if the app is not "open". As a way to try this plugging to see if it fit my need, I code a very easy app where when I tap a button, it launch the bluetooth scan as a "forground service", and when the same button is tap again, it stop the scan and the foreground service.
A few second after closing the foreground service, I have the following warning on my console :
"E/PowerManager(14614): WakeLock finalized while still held: FlutterBackgroundPlugin:Wakelock"
Even though the app seems to work fine. When I tap pthe button I can see my bluetooth scan starting (it prints the snaned devices), and when I tap it again, I can see the foreground service stoping (notification disapearing), and the bluetooth scan stopping as well.
Have you aver have this error ? Can i just igniore it, or did I do someting wrong ? I pasted bellow the way I'm using the plugging :
Smartphone: