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

Call ForceSync on app resume #797

Open
wants to merge 1 commit into
base: single_tenant_app_snapshot_unmaintained
Choose a base branch
from

Commits on Sep 23, 2021

  1. Call ForceSync on app resume

    This is a UI-only hack to experiment with syncing on every app start/resume.
    In general, our assumption was that people will open the app only sporadically,
    and we want to push data more frequently than that. So we do so in a background
    process.
    
    However, due to the various restrictions on background operations in android,
    sometimes the background process is not launched. We can ask the user to "force
    sync" but that is not a viable solution as well.
    
    We push a UI-only update that force-syncs on every app launch to see the extent
    of this problem and confirm that this fixes it.
    
    Once we know that this works, we should move this to native code, potentially
    by pushing data at the end of a trip as we do on iOS. We may also want to
    introduce silent push notifications on android as well.
    
    Testing done:
    - Started app
    - Paused and resumed app
    
    Saw message "app has started/resumed, forcing sync on android" in the console
    in both cases.
    shankari committed Sep 23, 2021
    Configuration menu
    Copy the full SHA
    03afcc0 View commit details
    Browse the repository at this point in the history