home_widget_counter icon indicating copy to clipboard operation
home_widget_counter copied to clipboard

The example [ANDROID] widget freezes after a few seconds of use.

Open tejas-janardhan opened this issue 1 year ago • 6 comments

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.

tejas-janardhan avatar Feb 17 '24 15:02 tejas-janardhan

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

binhtran93 avatar Apr 08 '24 14:04 binhtran93

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 avatar Apr 08 '24 17:04 binhtran93

@binhtran93 Thanks for the solution, could you share a link to the forked repo when you can. It would really help a lot !

tejas-janardhan avatar Apr 09 '24 07:04 tejas-janardhan

@binhtran93 would you mind opening a PR for this?

ABausG avatar Apr 20 '24 21:04 ABausG

@binhtran93 Can you share the solution? I'm facing similar problems and would love to know where you changed things 🙏

sebroehl avatar Apr 21 '24 08:04 sebroehl

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

binhtran93 avatar Apr 26 '24 03:04 binhtran93