2 hours ago · Tech · hide · 0 comments

WorkManager is Android Jetpack’s first party solution to long-running background work. It takes care of dealing with the idiosyncrasies and differences between Android versions, and gives you a very simple API that lets you focus on what needs to happen instead of the how. It’s very well designed, and as someone who’s had to deal with JobScheduler and AlarmManager years ago for this class of problems, it’s a boon. That said, debugging WorkManager is somewhat cumbersome (ref). This also had the limitation that it only lets you debug issues on your own device, and collecting metrics from the field required instrumenting each worker manually to report back metrics which just doesn’t scale all that well. Enter: ExecutionEventListener. This is a brand new API that was introduced in WorkManager 2.12.0. The WorkManager team has also introduced a new work-analytics library on top of this low-level API to retrieve historical execution data, but we’ll focus on ExecutionEventListener. It is…

No comments yet. Log in to reply on the Fediverse. Comments will appear here.