Bug P3
Status Update
Comments
le...@gethomesafe.com <le...@gethomesafe.com> #2
I agree with the suggestion. I wasted quite a bit of time to diagnose the same issue as it was not clear to me at the time of reading the documentation that as a fallback on Android 11 and below the job had to run as a foreground service.
jo...@gmail.com <jo...@gmail.com> #3
More time wasted trying to work out whats going on with this error and from the lack of response, they dont care.
Not even a "Thank you for your suggestion" or an apology for the poor experience.
The arrogance and rudeness level of the Android Team grows day by day, and I for one is getting totally fed up with it.
Please sort out the team or start losing developers.
Not even a "Thank you for your suggestion" or an apology for the poor experience.
The arrogance and rudeness level of the Android Team grows day by day, and I for one is getting totally fed up with it.
Please sort out the team or start losing developers.
Description
If you allow me, I would like to give a feedback regarding the WorkManager experience and documentation.
Some context: I used WorkManager back in 2019 and now I’m trying it again based on the “Guide to background work” and the new Expedited function.
My first experience was kind of confusing, because right after the initial implementation, I was facing the following issue:
The “problem” here is that the stacktrace does not link this error to my
Worker
. At a first look, it seems that something is wrong with the library, rather than my implementation. I was also confused because in my first try, I was not trying to use setExpedited, just a simple “following the how-to from the docs” example.So, I tried to Google “WorkManager not implemented” and all the links (official docs, Mediums, StackOverflows) does not mention that the
getForegroundInfo
needs to be overridden in our Workers.After sometime, I was able to find this page which contains information about this function (I Googled “workmanager getForegroundInfo”) but it does not contain an example on how to implement this function. In fact, the first time I saw the implementation for this function was on this Stack Overflow .
IMHO, I think if maybe the
IllegalStateException
inside “CoroutineWorker” has a more meaningful information (like “getForegroundInfo not implemented. Did you forget to add it on your CoroutineWorker?” or similar) or linking to our classes, it would be very helpful. Or even make this function abstract to force an implementation.Also, I think the docs should give a more complete implementation, like in this page where it shows how to use with Coroutine, for example.
I’m sorry if anything that I’m mentioning here already is well documented and I was not able to find it. But I believe that if I had some trouble making it work, other developers, specially the new ones, will face similar experience.