Open sonisumit686 opened 7 months ago
Hi @sonisumit686 I always wondered about this issue while developing this package but never faced it. I guess power saving mode is more stricter in some devices than other, ref.
One weird thing I noticed too, once we enable the logs (Flutter logs) or run a debug variant of build on same code base, it is triggering events, I can confirm there are no additional steps performed in release/signing stages other than ripping out the debug info.
My guess is a timer is not sufficient to prevent the device from hibernating the process, so i think when you enabled logs, a much heavier operation is being performed continuously which cannot be stopped by OS. We can use background tasks for better results, but I am not sure if it would be 100% reliable. Currently I can't think of anything else, I will update if I get anything.
Thanks much for getting back @SankethBK, I will too keep an eye on it and update here if come across any workaround or solutions.
Hi, i've fixed this issue in latest release 3.0.0
. I have removed the timer completely which has risk of getting terminated from OS, instead storing the timestamp when app is pushed to the background and calculating the time difference when app regains focus.
I am using this useful package in one of my applications, working fine on range of devices though no events are getting fired on Samsung S23 devices (S23 max too) with Android 14 OSv. None is getting triggered, user inactivity or app focus.
The current implementation is having 4 mins of timeout trigger and targeted for Android and iOS. Checked on device OS level optimisations and power saving mode too but nothing down to that level is causing it.
One weird thing I noticed too, once we enable the logs (Flutter logs) or run a debug variant of build on same code base, it is triggering events, I can confirm there are no additional steps performed in release/signing stages other than ripping out the debug info. Any ideas on it would be helpful to get myself unblocked.