Widget disappears on restart (Android 12)

Hi,

The Flowx widget disappears whenever I restart my Samsung 21 FE phone. It uses Samsung’s OneUI 4.1 based on Android 12. The issue started about 4 months ago. I am on the very latest Flowx as well as the very latest Samsung updates.

To fix it, I have to create another Flowx widget on one of my home screens which shows both the newly created as well as the original widget. I then delete again the duplicate newly created one.

A fix would be much appreciated.

Thanks
Christian

1 Like

@40by25 Hello and Welcome to the Forum and Thank You for Using Flowx

1 Like

sounds like an issue with android 12 way of handling the widget @duane will have better information for sure

1 Like

Android has added 4 or 5 new ways to manage background services in the last 5 years in order to limit/optimize background services. They added another way and added more limitations in Android 12. By this stage my code looked like a Frankenstein from all these changes so I decided to rewrite the code from scratch. This is my next big job for Flowx.

Can you check the optimization settings (Android Settings > Apps > Flowx) for Flowx?

3 Likes

Hi Duane,

Thanks for your reply. The optimization setting had been ‘Optimized’. I set it to ‘Unrestricted’ now to see whether that will keep the widget visible on device restart.

The strange thing is, the widget only disappears after a reboot of my Samsung S21FE, never otherwise. Also, no other widget exposes the same behavior. And finally, the device somehow remembers the invisible widget and all of its settings. I can make it reappear simply by placing a new FlowX widget somewhere else on the screen. This will make both the newly created widget and the original widget visible. Until the next restart.

I will let you know whether the new optimization mode makes any difference.

Thanks
Christian

1 Like

Hi Duane,

Great news! That did the trick. The widget now survived the reboot. Thanks a lot for your help and for creating this awesome app.

Best regards
Christian

2 Likes

Maybe I need to detect the “Optmized/Unrestricted” state and inform the user via a dialog.

But I do want to rewrite the code from scratch - it’s such a mess.

2 Likes

The notification that you mentioned is a great idea and would have helped a lot. I had been wondering about this issue for maybe half a year before raising it here.

All the best.
Christian

2 Likes

I have just reinstalled flowx after not using it for about 6 months, and also found i cant get the widgets to stay after rebooting.

Putting a new widget will bring them back though

Like the previous contibuter i also have a samsung, but an s10 lite model

1 Like

What version of Flowx are you using? and what Android version?

2 Likes

Im using flowx version 3.380

And have android 12 with one UI 4.1 if the samsung skin version has any impact

Many thanks

2 Likes

You timed it perfectly for some changes to the widget updating on Android 12 which has been a problem.

Do you have a place in travel mode?

Do you have a Samsung? They restrict battery use a lot and can stop widgets updating in the background. The best option is to set Android Settings > Apps > Flowx > Battery to Unrestricted.

2 Likes

Yes its a samsung, and i do have the main location on travel mode.

I have set the battery mode to unrestricted, which just about all my apps are set to. I had just forgotten to do it with flowx.

Lets see what happens!

Many thanks for the advice

2 Likes

Is setting apps to “Unrestricted” a normal practice on Samsungs?

I’ve been trying to fix this widget update problem without having to set the app to “Unrestricted”. It works for my emulated Android 12 devices, but it seems when I release the app into the wild, it doesn’t work on some devices - mainly Samsung but this might be because most people have Samsungs.

1 Like

No, the default setting is optimised, but i put things that i want running in the background onto unrestricted as samsung phones seem to be a bit too ruthless in closing things down

1 Like

Yes, this was the same for me on my factory install of a recently purchased Samsung Galaxy S21 FE with the very latest FlowX and Samsung updates. I am always keen to run on the latest versions, currently on Android 12, One UI 4.1, Google Play 1 June 2022, Kernel 5.4.147. As Samsung accounts for such a large share of Android devices in use, it may be worth fixing this problem at the root, though your suggested workaround has been working fine for me - thanks again for that.

All my other widgets (Smooth Calendar, XE, etc.) survive the default battery settings of the device (Optimized) except for FlowX. For FlowX, I had to set the battery settings to “Unrestricted”. Every since doing that, the FlowX widget now also survives both device restarts and upgrades.

2 Likes

Widget updates have been a right pain since the OS has been optimizing battery use. There are 5+ ways to periodically update widgets. I’m now using the most recent and recommended method and it doesn’t work properly. Because there are 5+ ways to update the widget, information on the web is conflicting. It is so so so frustrating and a waste of my time.

4 Likes

Nothing i try gets the widgets to stay or even reappear.

I like the widgets, they are very useful and i use them a lot when flowx is installed.

I would resubscribe, but am currently reluctant to as i wont be able to use flowx the way i want to.

Fingers crossed you are able to find a solution :crossed_fingers:

2 Likes

Did you try setting the Battery optimization for Flowx to “Unrestricted”?

2 Likes

Yes

.

2 Likes