Android Work Manager: “Could not instantiate Worker”
I had the same issue. The cause of the issue for me was that my Worker class was a nested class. The moment I made it an independent class, it worked.
I had the same issue. The cause of the issue for me was that my Worker class was a nested class. The moment I made it an independent class, it worked.
WorkManager comes with following features: Provides tasks which can survive process death It can waken up the app and app’s process to do the work thereby guarantees that works will be executed. Allows observation of work status and the ability to create complex chains of work Allows work chaining which allows to segregate big chunk … Read more
WorkManager isn’t appropriate for work that needs to happen at a particular time. You should use AlarmManager, and specifically AlarmManagerCompat.setExactAndAllowWhileIdle(), to get a callback at a specific time.
Unfortunately, you cannot schedule a work at specific time as of now. If you have time critical implementation then you should use AlarmManager to set alarm that can fire while in Doze to by using setAndAllowWhileIdle() or setExactAndAllowWhileIdle(). You can schedule a work, with onetime initial delay or execute it periodically, using the WorkManager as … Read more
Based on various issues reported on the WorkManager bugtracker, their documentation is not completely precise about the exact behavior of the WorkManager in such edge cases. On certain devices, apps are force stopped when the app is cleared from task manager, so that part is expected. … source Unfortunately, some devices implement killing the app … Read more