on 10-12-2022 11:18 AM
Hello All,
We are in process of building a MDK offline application. Initially, when device is not having any connectivity, data will reside in the offline store. Now user may kill the app or close the app as they don't have the connectivity.
Once device detects the network, our client wants us to automatically push the data from the offline store to the backend but without any intervention of the user to even open the application. Requirement is to sync the offline store even when the app is not opened by the user. Is this possible because I couldn't find anything in the documentation regarding sending data when app is not open.
We have already tried "onSuspend" event and used connectivityModule to detect the device connectivity status before pushing the data but it doesn't work for us.
Request if anyone has cme across such a requirement.
Regards,
Karan Shaheri.
No, if the app is not open there would be no way for this to happen without user interaction.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Bill,
Thanks for the information.
Does that mean that when we close the application, app doesn't run in the background? We thought there would be some event which may help us in this requirement if the app runs in background?
How does push notifications work in MDK then?
Regards,
Karan Shaheri.
Correct, the app "may" continue to run for a brief time in the background but the OS controls how long and if it is allowed. For example on Android the power settings will typically disable background apps.
In general, mobile apps are highly discouraged from running in the background. We do not currently have any specific events / support for background operations especially if the app has been closed.
Push messages are actually received by the OS and not directly by the MDK client. The OS decides what to do with the push message depending on if the client is currently running or not.
User | Count |
---|---|
72 | |
9 | |
8 | |
6 | |
6 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.