mvmike / min-cal-widget

Minimal calendar widget
BSD 3-Clause "New" or "Revised" License
89 stars 15 forks source link

Widget closes when leaving first settings screen #182

Closed CorentinLavergne closed 1 year ago

CorentinLavergne commented 1 year ago

A frustrating issue, when you close the setting after putting the widget on the board, the widget disappear (you can see it during a frame and that's all)

mvmike commented 1 year ago

Hi @CorentinLavergne, would you mind providing more information so I can reproduce this? app version, device, android version, launcher...

jimktrains commented 1 year ago

Pixel 4a, Android 13, Lawnchait launcher v2

mvmike commented 1 year ago

Couldn't reproduce in the emulator using a pixel 4a in android 13, neither in the latest alpha from lawnchair nor the latest debug apk build.

Screenshot at 2023-08-14 13-27-37

Could you confirm that Lawnchair has permissions to create widgets? A logcat would also be really helpful.

PS: @mvdan IIRC you had that same device, would you mind trying to reproduce the issue too? 🙏🏻

jimktrains commented 1 year ago

Yes, I can confirm it can create widgets as it has other widgets on it. I can see if I can get a logcat.

The Google Calendar widget was behaving the same way. It looks like Lawnchair2 hasn't been updated in a few years, so I switched over to Nova, and the widget work there.

Edit: Ah, it seems there's a more recent version of Lawnchair (than is in F-Droid). I might have to give that a shot. https://f-droid.org/packages/ch.deletescape.lawnchair.plah/ is the version I was using.

mvmike commented 1 year ago

Thanks for the info, @jimktrains, could finally reproduce the issue. Even though it is related on how Android 13 sends the closing activity intent (from the configuration screen) to the launcher and those launchers that are targeting newest android versions are not experiencing problems here since it works out of the box, could find a workaround and implemented it under https://github.com/mvmike/min-cal-widget/commit/0de32f0f09b8f9b30741f9b63f3dab3d28a45092.

This should also cover other old launchers being used in newer android versions.