How does offline syncing work for Android and iOS mobile apps?

Automatic Smart Sync takes the hassle out of syncing, protects user data, and gives users peace of mind.

Overview, Settings Options, Auto Sync Triggers, Manual Sync Triggers, Order in which Changes Sync, Legend of Sync Icons on Web, Data Conflict Resolution,  When a User Encounters Problems, Common Issues

Overview

    • Every edit is tracked and synced one discrete piece at a time, on a per-observation/answer basis. These discrete pieces of data are called "deltas".
    • When the device has connectivity, after the user taps “Save and Exit”, the deltas immediately and automatically begin syncing to the server.Screenshot_20220223-172929_Wildnote
    • Mobile users can watch the countdown of the deltas as each survey syncs.
    • Wildnote is available for full use while the sync is in progress.  Users can even edit the survey while it is being synced.  The app detects additional changes and adds them to the stack of deltas to be synced.
    • Web users see icons which indicate when all mobile survey observations have been received, photos are loading, or a survey integrity check has failed.

    • A table of deltas is stored on the mobile device as well as the server, which enables us to retrace data history on both mobile and web so we can better address data integrity issues.

    • BEST PRACTICE: We recommend all users sync all data each day.

     

     

    Settings Options

    All settings options can be found under the 3-dot menu on the project listing page of the mobile app.Mobile App Settings Screenshot

    • Auto-Sync Sync On/Off: Disable the automatic sync with this button (i.e., a user with a limited cellular plan may want to wait for wi-fi access to allow syncing or the user knows that they have extremely poor connectivity).
    • Show Survey Time by Default: This switch toggles display of the time survey was created and the Survey ID number.
    • Survey Sort: Choose how you would like the completed surveys to sort on your device.
    • Reset: Synchronizes all data with the server. NOTE: This is only to be used under the guidance and direction of Wildnote Support or data loss could occur.

    Auto-Sync Triggers

    • Tapping Save & Exit button on any survey.
    • [Android only] On app startup.  iOS does not sync on app startup.
    • Each time Save & Exit is tapped, the app will attempt once to connect to the internet, then abort if there is no connection.  It will try one time per Save & Exit.
    • Only one operation is performed at a time during sync (no concurrent/multithreaded activity).
    • When user taps “Save and Exit”, the focus returns to the survey list page, a red number of deltas appears to the right of the survey name, and the deltas begin decreasing as they sync to the server.
    • Everything except photos sync first. You will notice a slowdown when the deltas equal the number of photos in the survey. Depending on connectivity speeds, photos can take up to 2 minutes to sync per photo over a slow connection.
    • NOTE: user can abort a sync by exiting the app.

    Manual Sync Triggers

    • Pull down to refresh: from the Survey list page or Project list page, scroll to the top of the list.  Place finger at the top of the list of surveys or projects and drag finger down across the list and release.  The sync will begin.  A spinning icon appears until the sync completes. 
    • OR tap on the brown arrows at the top of the Projects page. 
    IMPORTANT NOTE: Wildnote must be in the foreground during the sync. If a sync is in progress and the user navigates away from Wildnote, the sync will stop.  When the user returns to Wildnote, the number of deltas will be static.  Restart the sync by “pulling down to refresh”. 

    Order in which Changes Sync

    First, new data on the mobile device is uploaded. After the upload completes, then any changes made on the server will download to the device.

    1. Surveys
      1. Checkmark appears when observations are complete. The survey ID may still be zero even if there is a green checkmark.
      2. Photos are processed last 
      3. While photos are processing, the icon on the web survey list page  is a photo; when complete, the icon returns to checkmark.
      4. Scheduling changes manifest as surveys being downloaded
    2. Projects (includes locations, member roles/updates, taxon favorites)
    3. Survey Statuses
    4. Survey Templates
    5. Project<->Survey Template mapping table is generated
    6. Project Documents that may have been modified during sync
    7. Changes to taxonomy lists, download indicator statuses

    IMPORTANT NOTE: The green checkmark now appears on mobile to confirm that all deltas for that survey were successfully communicated to the server, but does not convey when their processing on the server successfully completes.

    Also, after the checkmark appears, photos may still be uploading from your mobile device to the cloud.  And the sync to mobile from the server may continue for photos, taxon list, re-sort of Wetland species repeaters, survey ID, and other info.   The sync spinner remains animated until these circumstances. Users are encouraged to QA/QC their data as soon as they are able.

    Legend of Sync Icons on Web Survey List Page

    Sync Status Symbol

    Meaning

    Sync is complete for all observations. (Sometimes has not yet accounted for photos.)


    After install/migration of the sync refactor release, checkmark appears for all data successfully synced with sync  refactor (created/edited), regardless of platform.


    While sync is in progress:

    • A triangle icon may appear while non-photo observations are syncing (because all questions have not yet completed sync).
    • Checkmark appears when all  observations are complete.  
    • While photos are being processed, a photo icon appears.  
    • When photo sync completes,  icon is replaced with the checkmark.

    (For more info, see section above, Order in Which Deltas Sync)

    Access Control:

    -For roles other than superuser or project admin, the survey will only show when the checkmark is ready to appear.

    Upload of photos to cloud storage is in process

    Failed integrity check-the survey may have missing questions.

    Regular Causes:

    • Sync in process is not complete.
    • Sync was interrupted and needs to resume (the user will see the red bubble with numbers rather than a green checkmark).

    Access Control: 

    • Visibility rules for web: Admin can see this survey, but not edit it.  Invisible to all other roles.
    • Visibility rules for mobile: Only the originator can see or edit it.

         

    Sync interrupted due to connectivity problem.  You might also see a cloud icon.

    Check connection and reinitiate sync to resume.  

    This icon will persist, even when sync resumes.  It remains until the sync completes.  

    [empty]

    Meanings for no checkmark:

    • Survey exists only on the web; hasn’t been synced to mobile.
    • Where an existing survey is being updated with additional repeaters, checkmark may disappear briefly while some repeaters are incomplete.

    Data Conflict Resolution:

    Automatic Smart Sync handles data changes at the object level, which allows any number of users to successfully sync changes to different questions (or to the same question for photos and multiselects) in the same survey.

    If two users make changes to the same question, the sync will succeed, the deltas will be preserved, but the last change made  will win.

    Example of conflict resolution: 
    If User1 makes a change earlier than User2 but syncs later than User2, User1’s change will not be applied. (The time the data was actually changed matters, as opposed to the time it was synced.)

    IMPORTANT NOTE: Should the incorrect data be overwritten, please contact Customer Success (support@wildnoteapp.com) and ask for the data to be restored. Please include the name of the project and a link to the survey along with the details of which question needs to be fixed.

    When a User Encounters Problems

    • Users may be confused when the sync spinner continues after actions visible to the user have completed;  this is no cause for concern. Other kinds of data proceed to sync after the green checkmark shows up (it confirms all survey data has been synced to the server).  Following the green checkmark, taxon lists and other info may still be syncing. 
    • If the sync stalls and pull-down won’t restart it, exit the app, reopen and pull-down to initiate sync.

    Common Issues

    • The most common issue is that the user navigates away from Wildnote during the sync. This could be responding to a text, opening or going to another app, taking a call, or the screen timeout activating. The user will need to start the sync again for it to complete.
    • If you have a lot of data to sync, we recommend that you plug in your device, turn off notifications, turn off the screen timeout and start the sync.
    • User forgets to sync at the beginning of their day and does not get all of the changes that were made on the web delivered to their mobile device. 
    • The user is missing a project, or the new project is incomplete. This can happen if the sync is interrupted during the download process. Try starting the sync again. If this does not resolve it, the use the Reset button under settings. NOTE: make sure all data is synced prior to using the Reset button. If you are unsure, then contact customer support.