What is the proper way to start a widget, either when the app loads, or programmatically from another widget, so that it can listen for data being published, even if the user hasn’t accessed it yet?
In widget you want to get published data in, when the widget starts up you just call this.fetchData(); and it will get data whether it was open at the time the data was published or not. If you want a widget to open at start then just set that widget to open at start:
The widget added from the widgets collection can be set to open automatically when apps start. To do so, click the dot on the widget to change it to dark green. A maximum of two widgets can open automatically: one is on the controller and another in the placeholder.
To open programatically there are a half dozen or more thread on this.
Retrieving data ...