What if in between someone get offline in native mobile app

Hello, Suppose I am using native mobile app (which have been created using mendix), we have used nanoflows for it. Some of the data we are getting from APIs also. While using the app, in between internet goes down and I am offline mode. In this case, what all data we can access and what not   Please let me know. Its urgent.   Thanks, Trishla
1 answers

Hi Trishla,


This depends on when your app is offline. Mendix Native applications have their own local database on the phone/tablet (doc), which may not always be in sync with the actual data on the server. Mendix will automatically synchronize data when (taken from Mendix doc):

Mendix automatically analyzes your app’s data model to determine which entities should be synchronized based on the pages and nanoflows used within your offline navigation profile. In addition, the platform takes entity access into account so that only the data the user is allowed to access is synchronized.

Synchronization is automatically triggered during the following scenarios:

The initial startup of your mobile app
The first startup of your mobile app after your Mendix app is redeployed when the following conditions are matched:
There is a network connection
You are using a new Mendix version
The domain model used in the offline-first app has changed (note that the Mendix Client can sometimes optimize the process for certain domain model changes and will skip this automatic synchronization leading to a faster startup time)
After the app user logs in or out (note that synchronization after log out does not synchronize the data of the logged-out user, but rather synchronizes the data for the anonymous user)


During usage of the application, a user can access any data that has been synchronized even though the user is offline (as it is stored on its local database). However, any new data changes that occur on the server cannot be synced to the user if the user is offline. You should build your logic around this if it is necessary for the user to always have the most recent data.


Hope this helps.