如果我们已经有了 JobScheduler和一些具有相同功能的漂亮的后端口(AndroidJob和FirebaseJobDispatcher),为什么我们还需要新的Android JobScheduler呢?它有什么杀手级的功能吗?因为我没有看到任何让我想要迁移到另一个调度器的。
发布于 2019-08-10 02:52:40
WorkManager位于JobScheduler和AlarmManager之上。WorkManager根据用户的设备API级别等条件选择要使用的正确API
WorkManager是一个简单但非常灵活的库,它有很多额外的好处。其中包括:
-Support for both asynchronous one-off and periodic tasks.
-Support for constraints such as network conditions, storage space, and charging -status
-Chaining of complex work requests, including running work in parallel.
-Output from one work request used as input for the next.
-Handles API level compatibility back to API level 14.
-Works with or without Google Play services.
-Follows system health best practices.
-LiveData support to easily display work request state in UI.
https://stackoverflow.com/questions/50279364
复制相似问题