I used the home_widget package to communicate with my native Android and iOS widget and the communication is working well.
I would like to know if there is a method to know if the widget is installed by a user, since I am doing background updates with a background worker and don't want to do background processing if it isn't necessary.
I haven't found anything so far. If there is no way of retrieving this information, I'm interested to know how others go about background processing for background widget updates where no widget is installed.
Okay, just in case someone thinks about how to do the same thing: I decided to save a timestamp in shared preferences/UserDefaults when the widget code is executed. Then I can check in my App for the timestamp and (if the last execution wasn't too long ago, meaning the widget might be uninstalled again) decide whether I want to start the background jobs.
Still happy to hear other ideas.