Hello? I am making a homescreen widget, and I read...
# android
c
Hello? I am making a homescreen widget, and I read the document about android widget. And there is a sentence like below
Copy code
Note: Because AppWidgetProvider is an extension of BroadcastReceiver, your process is not guaranteed to keep running after the callback methods return (see BroadcastReceiver for information about the broadcast lifecycle). If your widget setup process can take several seconds (perhaps while performing web requests) and you require that your process continues, consider starting a Task using WorkManager in the onUpdate() method. From within the task, you can perform your own updates to the widget without worrying about the AppWidgetProvider closing down due to an Application Not Responding (ANR) error.
But I also know that there is a some issue about using WorkManager with Widget like below. • https://issuetracker.google.com/issues/115575872 So, My question is that Is there a good sample of using workmanager to update homescreen widget?
😶 3