Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No using WorkManager while scheduling reliable asynchronous tasks #25

Open
amazuerar opened this issue Aug 13, 2021 · 0 comments
Open

Comments

@amazuerar
Copy link

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

JobScheduler scheduler =
(JobScheduler) c.getSystemService(Context.JOB_SCHEDULER_SERVICE);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant