stately icon indicating copy to clipboard operation
stately copied to clipboard

No using WorkManager while scheduling reliable asynchronous tasks

Open amazuerar opened this issue 4 years ago • 0 comments

Dear Developer!

My name is Alejandro Mazuera-Rozo, I am a PhD Student at Universidad de los Andes, and at Università della Svizzera italiana. I am part of a research on the usage of network libraries within Android apps. As result of this we identified some code locations that might have network related problems.

In this case, we address the code locations that are related to a potential issue while scheduling reliable asynchronous tasks. As you might know, WorkManager is an API that makes it easy to schedule such tasks which are expected to run even if the app exits or the device restarts. The WorkManager API is a suitable and recommended replacement for all previous Android background scheduling APIs, including FirebaseJobDispatcher, GcmNetworkManager, and, in this particular scenario, Job Scheduler.

In order to address this issue we recommend you to visit:

  1. https://developer.android.com/topic/libraries/architecture/workmanager
  2. https://android-developers.googleblog.com/2019/11/unifying-background-task-scheduling-on.html

Potential Code Location missing WorkManager

https://github.com/lloydtorres/stately/blob/1992d85929a8e73f8ecd602737087e51af12006a/Stately/app/src/main/java/com/lloydtorres/stately/push/TrixHelper.java#L224-L225

amazuerar avatar Aug 13 '21 09:08 amazuerar