Hi,
I was wondering if it's possible to reload the widget data by location. For e.g. if your location changed significantly, how would we force the widget to reload it's data?
Thanks.
I was wondering if it's possible to reload the widget data by location. For e.g. if your location changed significantly, how would we force the widget to reload it's data?
Thanks.
@Rubenfern is correct, your app can monitor location changes and use the WidgetCenter APIs to reload affected widgets. A couple things I'd suggest you keep in mind:
Only reload the widgets that are affected. You can get some details in the Keeping a Widget Up To Date article
Consider the granularity that would make sense for the widget to be updated, especially since widget reloads are not guaranteed to happen immediately