Offline support for mobile apps – a key business need for the digital era - is the ability for an application to fluidly handle a lack of internet connectivity. The popularity and reach of mobile devices increases the need for Mobile app development to work seamlessly when used in remote locations like constructions sites, customer cost centers, etc.
There are mainly two types of offline app design approaches that define the overall application architecture and enhancements:
Short Network Loss
These apps are able to cover for short network losses (i.e a few minutes) in the absence of the network connectivity. They work on a “cache and sync” mechanism where the app temporarily stores data in cache till the network reconnects and then syncs the data back to the remote server.
Extended Network Loss
These apps are primarily designed to work in the offline mode for a longer period of time. The architecture here is more complex as all the master and transactional data needs to be stored continually on the local device’s storage and requires data processing capabilities like applying business specific rules, conflict resolutions and creation of stringent security polices and so forth.
It is important to categorize and define the offline support requirements for mobile apps correctly to avoid any compromise on app performance and data security.
Leading Practices followed by Mobile App Development Companies:
It’s a common myth that offline apps are not as secure as online apps due to the fact that all data lies on the device itself. It really depends on how the app architecture and design are implemented.
Below are some of the approaches that need to be followed while considering enterprise mobility and developing business critical offline apps:
- Secure and encrypted persistent device data storage
- Robust mechanism to interact with remote servers with offline cache mechanism
- Secure mechanism to backtrack and play forward user interactions
- Offline user authentication and session management
- Intelligent algorithms to decide data storage at runtime (browser versus device)
- App state support like background and kill actions
Approaches for Implementing Offline Apps
Local Cache Read Only
In this approach, the app simply creates a read only cache on the application device for the user to consume while the app is offline. The app checks in background for synching the updated content from the server to ensure all the data is updated.
While simple to implement and maintain, this approach works only when there is static content to deliver. This approach will not address complex situations where the user is manipulating the data content on the app side, requiring a more robust design.
Last Write Wins
When there is a predicable frequency of data updates from the back end systems, the simplest sync policy is “last write wins” where the latest updated record becomes the master record. This allows the user to perform a full CRUD (Create, Read, Update, Delete) operation on the client side in offline mode.
This approach cannot resolve the any data conflicts that might appear during offline operation. If the business requires accommodation for concurrent write, the “last write wins” will not be appropriate.
Custom Conflict Resolution
This is the most comprehensive and complex approach for caching and data syncing. The organization can define priority end points that need to be cached based on business requirements.
This approach is mainly considered in single channel apps that need to manipulate a large number of end points, like applications that deal with inventory management. The drawback with policy-based conflict resolution for offline capability is simply the time and cost associated in creating it.
Field Data Capture and Emtec
Given their ubiquity, increasing functionality, and decreasing acquisition and operating costs, it is not surprising that mobile phones are being utilized more frequently to aid in data collection efforts around the world. While many people may believe that such efforts require the use of high-end (and expensive) smart phones, the required phone configuration really depends upon the context and processing power needs.
To help our clients digitize raw onsite data at remote project locations with limited network connectivity and transform it to business critical intelligence, Emtec has developed intellectual property around Offline Field Data Capture. The application has not only helped capture accurate data, but also enables tracking time and efficiency of onsite employees.