I've keep counting user's steps as using flutter packages flutter_background_service, flutter_background_service_android and flutter_local_notifications.
However after some days later, some Android devices shows not our notification icon, but default icon, which means something go wrong.
Even this counting user step doesn't work at all.
And I know that background work can be killed by device automatically, but after this default icon shows, then even if user open app, which means this app calls StepNotification().initializeService(), Default icon is not changed and counting step also doesn't work at all.
And even sometimes without default icon, just app icon disappears and of course background work is not working even user opens app which means it calls background work even from foreground again.
I can understand device kills background work due to battery.
But even user call background work again, why doesn't it work again?
Even I debug with the device having this issue, It works perfect.
But only when I download app in release mode, it shows this error so I can't see any issue log.
Please help me whether some code or permission is missing here.
I've keep counting user's steps as using flutter packages
flutter_background_service
,flutter_background_service_android
andflutter_local_notifications
.I write all codes in class
StepNotification
.I check activityRecognition and if this permission is given, I call background work.
I realized that some permission is more needed in AndroidManifest from Android 14 based on document.
So I set below.
And it works well.
However after some days later, some Android devices shows not our notification icon, but default icon, which means something go wrong.
Even this counting user step doesn't work at all.
And I know that background work can be killed by device automatically, but after this default icon shows, then even if user open app, which means this app calls
StepNotification().initializeService()
, Default icon is not changed and counting step also doesn't work at all.And even sometimes without default icon, just app icon disappears and of course background work is not working even user opens app which means it calls background work even from foreground again.
I can understand device kills background work due to battery. But even user call background work again, why doesn't it work again?
Even I debug with the device having this issue, It works perfect. But only when I download app in release mode, it shows this error so I can't see any issue log.
Please help me whether some code or permission is missing here.