Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Widget does not change to current activity #54

Open
WillTriumph1 opened this issue Feb 20, 2025 · 7 comments
Open

Widget does not change to current activity #54

WillTriumph1 opened this issue Feb 20, 2025 · 7 comments

Comments

@WillTriumph1
Copy link

This may be my fault, but the widget shows it’s original widget activity when set up. It does not switch to a new activity, either using the app to switch or the remote itself. I do not know if there is a way to trigger the widget update.
I did not think I would use the widget originally, but it does seem to have value when working.
On an iPad Pro, 13”, last generation.

@albaintor
Copy link
Owner

The conditions to switch to another activity :
1/ in the live activity : just enter into the activity in the app but the activity has to be on otherwise it will be ignored
2/ in the widgets : when you minimize the app the current activity

@WillTriumph1
Copy link
Author

I have closed the application, had to reopen and reload the resources. Go to the new/different activity and the widget still shows the wrong activity still.
Minimizing makes no change.

@albaintor
Copy link
Owner

Is the new/different activity active (status ON) ? it will be ignored otherwise

@WillTriumph1
Copy link
Author

It worked one update ago, but now it has “Room is inactive” regardless of changing activities, restareting the app, whatever I do.

@albaintor
Copy link
Owner

I have changed some things in the latest 1.3.3. I think this is fixed

@WillTriumph1
Copy link
Author

It still does not update, but I see there is a toggle icon when the widget is expanded. Hitting that and hitting the UC icon does seem to manually update the widget. Is there a way to prompt/trigger the widget to update - either cyclically or when there is a state change?

@albaintor
Copy link
Owner

albaintor commented Feb 24, 2025

Maybe things need to be improved but first let me explain how it works :

  • Only for Live Activities : each time you enter into a running activity in the app, the live activity is created/updated and kept up to date as long as the app is in foreground
  • Live activities can be instantiated only when the app is in foreground (Apple constraint), and in that case entering into a running activity
  • Each time you minimize the app, the shared data is updated : at this time the widget(s) are updated. Live activity is supposed to already be up to date
  • After the app is minimized : neither the live activity nor the widget are updated, even if the time position updates itself this is not based on updated data
  • Each time you press a button on the widget or live activity, then the widget is updated again (position, state, artwork...). Except the live activity if you switched to another activity, because of how they work I can't instantiate a different live activity on another activity than the one currently displayed

I could trigger updates every 10s or 1min for widgets or live activities but this is wanted to avoid constant polling of the remote and battery drains : no requests are done unless the user explicitely presses a button

I don't know if this description corresponds to your experience, otherwise there may be an issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants