Skip to content

Sync Settings

Sync Settings in Shipedge Warehouse Pro manages how your device synchronizes data with the Shipedge server. The app stores data locally and syncs it to the server to keep your warehouse records up to date.

Sync happens automatically when you perform actions, but you can also sync manually when needed. Understanding sync helps ensure your data is always current and nothing gets lost.

Keep Data Current

Sync ensures your warehouse records match what’s on the server. Other users see your updates immediately after sync.

Prevent Data Loss

If your device loses connection or crashes, synced data is safe on the server. Unsynced data stays on your device until you sync.

Track Progress

Sync records when work was completed. This helps track productivity and resolve timing questions.

Complete Operations

Some operations require sync to finish. The app shows alerts when sync is needed to complete your work.


The app shows sync status in different ways:

A red alert flag appears next to the Sync button when you have data waiting to sync. This happens in the Time Tracking module (TimeTrack.java).

What triggers the alert:

  • You have project time entries with status “Sync” in the local database
  • The app checks automatically when you open Time Tracking
  • The alert disappears after successful sync

What the alert means:

  • You have pending data that needs to sync
  • Click the Sync button to send data to the server
  • The alert updates automatically after sync completes

The Sync button lets you manually sync pending data. It’s located in the Time Tracking screen.

When to use:

  • The alert flag is visible (red flag next to Sync button)
  • You want to ensure all data is synced before closing the app
  • You’re switching between projects and want to sync current work

What happens:

  • The app collects all pending sync data
  • Sends it to the server in a single request
  • Updates local records based on server response
  • Hides the alert flag when sync completes successfully

  1. Open Time Tracking

    Navigate to Time Tracking from the main menu. The app checks for pending sync automatically when the screen loads.

  2. Check for Sync Alert

    Look at the top of the screen. If you see a red alert flag next to the Sync button, you have data waiting to sync.

  3. Tap Sync Button

    Tap the Sync button to start syncing. The app collects all pending data and sends it to the server.

  4. Wait for Completion

    The sync happens in the background. Wait a few seconds for it to complete. The alert flag disappears when sync finishes successfully.

  5. Verify Sync Status

    If the alert flag is gone, your data synced successfully. If it’s still visible, check your internet connection and try again.


The app checks for pending sync automatically:

When checks happen:

  • When you open the Time Tracking screen (TimeTrack.java calls verfySync())
  • After completing project actions (Start, Stop, Comment)
  • When switching between projects

What gets checked:

  • Local database records with status “Sync”
  • Project time entries waiting to sync
  • Comments and project updates

When you tap the Sync button:

  1. Collect Data: The app queries the local database for all records with status “Sync”
  2. Format Request: Converts data to JSON format for the server
  3. Send to Server: Uses ConnectToDataBaseServerProjectAsync.java to send data
  4. Update Status: Changes record status from “Sync” to “Synced” after successful sync
  5. Hide Alert: Removes the alert flag when no pending sync remains

The sync process handles these data types:

Project Time Entries:

  • Project start times
  • Project stop times
  • Total time worked
  • Project comments
  • User ID and project ID

Status Updates:

  • Project status changes
  • Registration IDs from server
  • Sync confirmations

The app uses different status values to track sync:

Sync

Data is waiting to sync. This appears in local database records that haven’t been sent to the server yet.

Synced

Data was successfully sent to the server. The server confirmed receipt and processing.

Alert Flag Visible

Red flag appears when you have records with “Sync” status. Tap Sync button to send data.

Alert Flag Hidden

No pending sync. All data is synced and up to date with the server.


Sync Regularly

Sync your data regularly, especially before closing the app or switching devices. This prevents data loss and keeps records current.

Check Alert Flag

Always check for the alert flag when opening Time Tracking. If it’s visible, sync before starting new work.

Stable Connection

Ensure you have a stable internet connection before syncing. Poor connections can cause sync failures.

Wait for Completion

Wait for sync to complete before closing the app. The alert flag disappearing confirms successful sync.

Sync After Changes

Sync after making important changes or completing projects. Don’t rely only on automatic checks.

Verify Server Updates

After syncing, verify your changes appear on the server if possible. This confirms sync worked correctly.


Problem: You tapped Sync, but the alert flag is still visible.

Solutions:

  • Check your internet connection - sync requires an active connection
  • Wait a few seconds - sync may still be processing
  • Tap Sync again - sometimes a second attempt resolves issues
  • Restart the app - this refreshes sync status checks
  • Check server status - if the server is down, sync will fail

Problem: Tapping Sync doesn’t do anything.

Solutions:

  • Verify you have pending data - if alert flag isn’t visible, there’s nothing to sync
  • Check internet connection - sync requires network access
  • Restart the app - this refreshes the sync functionality
  • Check device storage - low storage can prevent sync operations

Problem: You synced successfully, but data doesn’t appear on the server.

Solutions:

  • Wait a few minutes - server processing can take time
  • Verify sync was successful - check that alert flag disappeared
  • Check server logs - contact support if sync shows success but data is missing
  • Verify warehouse connection - ensure correct warehouse name and key in settings

Problem: You need to tap Sync multiple times before it works.

Solutions:

  • Check connection stability - unstable connections cause partial syncs
  • Sync smaller batches - if you have many pending records, sync may timeout
  • Contact support - if this happens regularly, there may be a server issue

Sync uses these local database tables:

LogError Table:

  • Stores project time entries
  • Tracks sync status (“Sync” or “Synced”)
  • Links to project and user information

LogProject Table:

  • Stores project details
  • Links to sync records via logErrorId
  • Tracks project status and timing

Sync uses ConnectToDataBaseServerProjectAsync.java:

Endpoint: Warehouse server URL (configured in settings)

Method: POST with JSON payload

Request Format:

[
{
"opt": "Sync",
"id": "record_id",
"userId": "user_id",
"projectId": "project_id",
"startTime": "time",
"stopTime": "time",
"comment": "comment_text",
"regId": "registration_id"
}
]

Response: Array of status updates for each synced record

The app verifies sync status using verfySync() method:

  1. Queries LogError table for records with status “Sync”
  2. Shows alert flag if any records found
  3. Hides alert flag if no pending records
  4. Updates UI based on sync status

Next Steps:

Related Activities:

  • TimeTrack.java - Time Tracking Activity with sync functionality
  • ConnectToDataBaseServerProjectAsync.java - API service for sync operations

Sync Settings ensure your local data stays synchronized with the Shipedge server:

Automatic checks - App verifies sync status when you open Time Tracking
Visual alerts - Red flag shows when sync is needed
Manual sync - Tap Sync button to send pending data
Status tracking - Clear indicators show sync progress
Data safety - Synced data is safe on the server

Sync regularly to keep your warehouse records current and prevent data loss.