androidandroid-task

GcmTaskService: What's an "in-flight task" documentation mentions?


The documentation for GcmNetworkManager::cancelTask https://developers.google.com/android/reference/com/google/android/gms/gcm/GcmNetworkManager"

says

Cancel a task, specified by tag. Note that a cancel will have no effect on an in-flight task.

What's an "in-flight" task ?


Solution

  • According to the documentation, the GcmNetworkManager collects various requests and executes them batch-wise (in the intention to minimize the times, the network system is used, in order to save battery).

    To my understanding, "in-flight" then means tasks, that are really already started, i.e. where the syncing is already in progress. So basically, you can only cancel tasks that have not yet started.