Closed alexnivanov closed 6 years ago
+1.
I also cannot understand how updates actually work on app resume.
By resume
i understand it is when you close your app clicking on Home button and app is going to the background in iOS as all apps do. When i click on the app icon again it resumes â so, i'm expecting updates check/download
and/or install
at this step.
But now check/download works only when i completely hard-close my application, eg. double click on Home button and swipe my application up to close it completely. After, if i open my application it updates successfully... Well, but users does't do that way, they don't close applications with the hard-close.
đ Hi! Thank you for your interest in this repo.
đĸ We are not using nordnet/cordova-hot-code-push anymore, and we lack the manpower and the experience needed to maintain it. We are aware of the inconveniece that this may cause you. Feel free to use it as is, or create your own fork.
đ This will now be closed & locked.
âšī¸ Please see #371 for more information.
Problem
According to both iOS and Android plugin code, the installs are only performed on event that assets folder are now installed on the external storage.
Android code explanation
in HodeCodePushPlugin:onResume we have check TextUtils.isEmpty(pluginInternalPrefs.getReadyForInstallationReleaseVersionName()) which is always failing until fetchUpdate() is called.
Meanwhile, fetchUpdate() is only called by JS (which I guess is done manually) or in AssetsInstalledEvent event (HodeCodePushPlugin:onEvent(final AssetsInstalledEvent event)) which is happening only once on app install.
So, I have to add hack and call fetchUpdate() in HodeCodePushPlugin:onResume to get the updates actually running on app resume!
Please advise if I misunderstood the architecture and the updates should be triggered somehow else.
System info
cordova-android: 7.1.0-dev