WaveMaker Docs

WaveMaker Docs

  • Get started
  • Widgets
  • Mobile
  • How-to
  • Enterprise
  • Releases
  • Blog
  • Sign-in

›Offline Features

Mobile Development

  • React Native or Cordova

React Native

  • Welcome
  • Features
  • Supported Widgets
  • Supported Variables
  • Test Run Preview
  • Debug Web Preview
  • Inspection Framework
  • Mobile Preview
  • Styles
  • Theme
  • Export as Zip
  • Build Installers
  • Debug APK
  • Debug IPA

Cordova

  • Building Hybrid Mobile Apps
  • Native Device Support
  • First Mobile App
  • Mobile Design

    • Mobile Page Design
    • Gesture Support
    • Mobile Tabbar
    • Mobile Navbar

    Mobile Installer

    • Test Run (Preview)
    • Debugging Mobile Apps
    • Test via Live Sync
    • Testing Hybrid Mobile Apps using WaveLens
    • Mobile Build - Android
    • Generating iOS and Android Distribution Certificates
    • Export Cordova zip
    • Mobile Build - Manual
    • Mobile Build - AppChef

    Mobile Integrations

    • Mobile Integrations - Amazon Mobile Analytics
    • Mobile Integrations - Amazon SNS
    • Using Push Notifications in Mobile Device
    • Invoking Web App APIs in Mobile Apps

    Offline Features

    • Offline Data Support
    • Implementation
    • Switching between Offline and Online Mode
Edit

Switching between Offline and Online Mode


9.2 release

Mobile Apps switch between online and offline modes based on the network connectivity. Apart from this, when an app uses offline DB and there is an intermittent network connectivity, the user should be able to decide when the offline changes need to be synced. In such a case, when the network is available, the user will be asked whether to connect to the backend server or continue in offline mode.

Online-Offline Modes

Following are the network scenarios and the state of WaveMaker apps:

The network is available

The app connected to the backend server

The app is in online mode.
The network is not availableThe app is in offline mode.

The network is available

The backend server is not available

The app is in offline mode.

Network and backend server is available

The app is not connected

The app is in offline mode.
(The app goes into this state when ‘goOffline’ operation is invoked.)
The app is trying to connect to backend serverThis is an intermediate state and app will be online or offline based on the success of the operation.

Implementation

A tag in index.html called ‘wm-network-info-toaster’ will display the network info toaster when there is app network status change. Messages shown in the toaster are part of the app’s localized messages. Following are the keys to these messages.

KeyMessage
LABEL_HIDE_NETWORK_INFOHide
LABEL_CONNECT_TO_SERVICEConnect
MESSAGE_SERVICE_NOT_AVAILABLEService is not reachable.
MESSAGE_NETWORK_NOT_AVAILABLENetwork not available.
MESSAGE_SERVICE_AVAILABLEService is available.
MESSAGE_SERVICE_CONNECTINGConnecting to server.
MESSAGE_SERVICE_CONNECTEDYou are online.

NOTES:

  • You can choose not to use this offline-online switch functionality. In such cases, you can remove the tag from index.html.
  • You can customize this functionality using the operations (getNetworkInfo, goOffline, goOnline) provided on ‘Device’ service. see here for more on device variables.

B.1 Mobile Apps

  • 1.1 Mobile App Development
    • i. App Architecture
    • ii. App Development
    • iii. Testing on Mobile
    • iv. Creating Installer
  • 1.2 Native Device Support
    • i. Device Specific Widgets
    • ii. Device Variables
    • iii. Platform Look n Feel
  • 1.3 Offline Data Support
    • i. Mechanism
    • ii. Storage Layer
    • iii. Sync Layer
    • iv. Enabling
      • ○ DB Configuration
      • ○ Variable Configuration
      • ○ Plugin Configuration
      • ○ Security Configuration
    • v. Support & Limitations
    • vi. Use Cases
Last updated on 7/15/2020 by Swetha Kundaram
← Implementation
WaveMaker
  • PRICING
  • PARTNERS
  • CUSTOMERS
  • ABOUT US
  • CONTACT US
Terms of Use | Copyright © 2013-2023 WaveMaker, Inc. All rights reserved.