Update UI from a Workmanager

后端 未结 3 638
梦如初夏
梦如初夏 2021-01-22 12:41

How do I update the UI from Android WorkManager.

Android Workmanager can receive Boolean, Integer, Long, Float, Double, String

Documentation says:



        
3条回答
  •  渐次进展
    2021-01-22 13:44

    For exactly that problem (I upload files with the WorkManager and want to monitor progress, not only result), I used EventBus. Super easy, put the listener anywhere you want - in my case the MainActivity, since I use a single activity pattern.

提交回复
热议问题