New in WorkManager 2.5.0, there is a workmanager-multiprocess module to solve this problem. You can implement this with
implementation "androidx.work:work-multiprocess:$work_version"
To use this, you can register a new WorkManager.Initializer
as detailed in this page:
https://developer.android.com/topic/libraries/architecture/workmanager/advanced/custom-configuration
When you register this initializer, your configurations need to include a call to .setDefaultProcessName("com.example.app:processName")
. This will make the calls occur in the correct process. I am testing this out right now, and it seems to be working, but I'll update this post if there are any issues.