Widget disappears on restart (Android 12)

I’m planning to as RainViewer for tips on how they do their widget and also add analytics so I can hopefully understand why some phones update and why some don’t.

3 Likes

You could also try the Smooth Calendar devs. Very good and mature little Android app and their widget also works. I cannot find their source code, but having contacted them before, I know they are helpful.

1 Like

I need something that downloads data and also checks for location when the place is in Travel Mode. Network and location access can use more battery can cause restrictive optimization.

Note, these widget updates work smoothly on my phone and probably a majority of phones. I need to add analytics to understand how prevalent this problem is and where it happens. I know it’s localised to Android 12+ but that’s about it.

2 Likes

More analytics sounds like a great idea. Your suggestion fixed the issue for me, BTW, but I would love for this to be also fixed for other users.

Just an idea: How about simply alerting the user on first opening the app (or after creating the first widget) that if the widget disappears on reboot, aggressive battery saving may be the culprit. And that the user should change the battery setup. In my case, it would have helped a lot. Could be only shown on phones that have a problem, such as S21 FE and maybe augmented by analytics in future.

2 Likes

That’s too clunkly for my liking. Things should just work.

This should be a last measure. Flowx should check if there is a widget, check whether it’s updating properly, and if not, show pop-up.

But first, I’d like to have widgets just work!!

3 Likes

Do you have “Travel Mode” on??

2 Likes

Yes, i have travel mode on

Thanks

2 Likes

So this is part of Googles restrictions on privacy. Along with battery optimizations they are making it harder to do things like get a location. Apparently, I have to fill in a form to get access to location in the background. This is new with Android 12 and I don’t know if all phone manufacturers are following these rules - again very frustrating.

Can you turn off Travel Mode, turn of location permissions and see if the widgets update? I’ll be good to know.

I actually had a new beta version ready to release where the widget didn’t update the location to see if this helped.

2 Likes

Switching off travel mode and location services did bring back the widget when i rebooted.:partying_face:

3 Likes

Great. Thanks for testing that.

I think the picture is just forming. There were two or more problems and they were masking each other. For example, if I changed to another type of widget update, it wouldn’t fix it for everyone which made me think it didn’t work, when instead it did work but was masked by the location restriction.

This is great news, I can try and replicate this travel mode condition and test things out.

I might make a release without checking for you location. This will mean you’ll have to open the Flowx to update your location.

How big a problem would this be for you?

2 Likes

Sounds great to me. Updating a location manually is not a bother. And I agree that software should just work. Great you found a solution!

2 Likes

Since switching off location services and travel mode, and then switching them back on again the widgets have been working as they should.

They happily reappear after rebooting.

Thanks for the suggestion

2 Likes

Happy to report that with your most recent update which I received this morning, the widget now correctly appears after a restart of my Android 13 Samsung Galaxy S21 FE, despite reverting to the default app-level battery optimisation state of ‘Optimised’ beforehand.

So the issue I originally reported in this thread is now resolved. Many thanks for all your work and the quick resolution. Awesome.

3 Likes