Skip to content
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
This repository was archived by the owner on Aug 8, 2023. It is now read-only.

Data requests when app is backgrounded #9965

Closed

Description

@tobrun

Users have reported seeing data requests occurring when the app has been backgrounded (the Activity is in an paused state). One example given was the download of a sprite (eg. [email protected]) which occured when the app has been backgrounded for a couple of hours. Ideally we stop requesting resources when onPause occurs and only resume downloads when we hit onResume.

Activity

  1. added
    Android
    on Sep 12, 2017
  2. kkaefer commented on Sep 12, 2017

    @kkaefer
    Member

    It's likely that this happens because resources expire while the app is still running in the background. When a resource expires, we try to reload/refresh it.

  3. kkaefer commented on Sep 12, 2017

    @kkaefer
    Member

    @tobrun DefaultFileSource has the ability to pause:

    /*
    * Pause file request activity.
    *
    * If pause is called then no revalidation or network request activity
    * will occur.
    */
    void pause();
    /*
    * Resume file request activity.
    *
    * Calling resume will unpause the file source and process any tasks that
    * expired while the file source was paused.
    */
    void resume();

    Are we calling this when the app goes to the background?

  4. tobrun commented on Sep 12, 2017

    @tobrun
    MemberAuthor

    Thank you for 👀 @kkaefer, we aren't atm, will fix this up.

  5. self-assigned this
    on Sep 27, 2017
  6. added this to the android-v5.2.0 milestone on Sep 27, 2017
  7. modified the milestones: android-v5.2.0, on Oct 2, 2017
  8. tobrun commented on Dec 12, 2017

    @tobrun
    MemberAuthor

    This landed in 5.2.0

  9. removed this from the milestone on Dec 12, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Android

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions