The example [ANDROID] widget freezes after a few seconds of use.
This was tested on
Android Pixel 3a Emulator on Windows 11. One Plus Nord 3, Android 14.
The app works as expected but the widget freezes after a few seconds of use, it start working again after a few minutes. Not able to find any crash logs on the flutter or android side as well. If you have any insights as to how to solve this problem please share it as well.
I'm having the same issue, both on the emulator and a real device. Please take a look
https://github.com/ABausG/home_widget_counter/assets/18588002/aae80109-d282-48a3-8d18-536aadc6fda9
Please someone take a look. Thank you
I found out why this issue is happening. For Android O and above devices, it is not guaranteed that the jobIntentService starts immediately. I forked the repo and used WorkManagerinstead, and it works perfectly now
@binhtran93 Thanks for the solution, could you share a link to the forked repo when you can. It would really help a lot !
@binhtran93 would you mind opening a PR for this?
@binhtran93 Can you share the solution? I'm facing similar problems and would love to know where you changed things 🙏
I'm sorry, but right now, I don't have time to create a PR. My knowledge of Android code is also limited. But I will upload my change here, feel free to check it out home_widget.zip