Stay organized with collections
Save and categorize content based on your preferences.
This module introduces support for running GlanceAppWidgets from multiple processes, with the WorkManager multiprocess library ("androidx.work:work-multiprocess").
Developers can define a widget using the RemoteGlanceAppWidget
class, which allows them to specify the component name of the RemoteWorkerService it will run in, as well as the component names of action receivers and RemoteViewsService. These components must then be set to the same process as the GlanceAppWidgetReceiver
in the manifest.
This way, developers can choose to provide different widgets from different processes.
Classes
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-05-15 UTC.
[null,null,["Last updated 2025-05-15 UTC."],[],[],null,["# androidx.glance.appwidget.multiprocess\n======================================\n\nThis module introduces support for running GlanceAppWidgets from multiple processes, with the WorkManager multiprocess library (\"androidx.work:work-multiprocess\").\n\nDevelopers can define a widget using the `RemoteGlanceAppWidget` class, which allows them to specify the component name of the RemoteWorkerService it will run in, as well as the component names of action receivers and RemoteViewsService. These components must then be set to the same process as the `GlanceAppWidgetReceiver` in the manifest.\n\nThis way, developers can choose to provide different widgets from different processes.\n\nClasses\n-------\n\n|---------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [MultiProcessConfig](/reference/kotlin/androidx/glance/appwidget/multiprocess/MultiProcessConfig) | This class specifies the components to be used when creating layouts for [MultiProcessGlanceAppWidget](/reference/kotlin/androidx/glance/appwidget/multiprocess/MultiProcessGlanceAppWidget). |\n| [MultiProcessGlanceAppWidget](/reference/kotlin/androidx/glance/appwidget/multiprocess/MultiProcessGlanceAppWidget) | MultiProcessGlanceAppWidget can be used with [androidx.glance.appwidget.GlanceAppWidgetReceiver](/reference/kotlin/androidx/glance/appwidget/GlanceAppWidgetReceiver) to support multiprocess use cases where different widget receivers run in different processes. |"]]