Skip to content

No using WorkManager while scheduling reliable asynchronous tasks #25

@amazuerar

Description

@amazuerar

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);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions