Skip to content
This repository has been archived by the owner on Oct 1, 2018. It is now read-only.

multiple cordova activity support + more #114

Closed
wants to merge 1 commit into from
Closed

multiple cordova activity support + more #114

wants to merge 1 commit into from

Conversation

oratthumzap
Copy link

hi!
we're using your amazing (!!!) plugin along with an SDK that we develop.
in this SDK we also allow multiple cordova activities to be active concurrently (one in the foreground, one in the background, etc.).
consequently, we modified the plugin code in order to support this architecture without breaking the basic usage of using only one cordova activity in an application.

in addition, we also implemented more improvements as can be seen below:

  1. refactored plugin to support more than one concurrently active cordova activity
  2. added support for concurrent file download
  3. updated event bus to latest release version (3.0.0)
  4. added plugin configuration keys
    a. auto-redirect-to-local-storage-index-page - if enabled, the index.html page will be loaded after web app updates / rollbacks / etc. otherwise a reload would not take place. default: enabled.
    b. require-fresh-install-after-app-update - if enabled, a fresh installed will be performed when the hosting app is updated. otherwise, the existing web app code will be used and updates will be made from that version on (this is important for us, as we are an SDK). default: enabled.
    c. file-download-concurrency - the number of files that will be downloaded concurrently when an update is performed. default: 1.
    d. use-initial-version-from-assets - if enabled, the default assets will be taken from the assets that were delivered with the hosting application. otherwise, either the assets will be downloaded as a zip file from a remote URL (see configuration key below), or a a stub update configuration will be created, which will trigger the download of ALL of the files in the "update" package.
    e. assets-remote-zip-url - if set, along with the "use-initial-version-from-assets" configuration key, will determine where the zipped assets will be downloaded from
  5. added new warnings to ChcpError
    a. AUTO_UPDATE_IS_NOT_ALLOWED - will be raised along with a relevant event when the plugin attempts to perform an auto update but it's not allowed according to the configuration.
    b. AUTO_INSTALL_IS_NOT_ALLOWED - will be raised along with a relevant event when the plugin attempts to perform an auto install but it's not allowed according to the configuration.

1. refactored plugin to support more than one concurrently active cordova activity
2. added support for concurrent file download
3. updated event bus to latest release version (3.0.0)
4. added plugin configuration keys
	a. auto-redirect-to-local-storage-index-page - if enabled, the index.html page will be loaded after web app updates / rollbacks / etc. otherwise not reload would take place. default: enabled.
	b. require-fresh-install-after-app-update - if enabled, a fresh installed will be performed when the hosting app is updated. otherwise, the existing web app code will be used and updates will be made from that version on. default: enabled.
	c. file-download-concurrency - the number of files that will be downloaded concurrently when an update is performed. default: 1.
	d. use-initial-version-from-assets - if enabled, the default assets will be taken from the assets that were delivered with the hosting application. otherwise, either the assets will be downloaded as a zip file from a remote URL (see configuration key below), or a stub update configuration will be created, therefore triggering a download of ALL of the update files.
	e. assets-remote-zip-url - if set, along with the "use-initial-version-from-assets" configuration key, will determine where the zipped assets will be downloaded from
5. added new warnings to ChcpError
	a. AUTO_UPDATE_IS_NOT_ALLOWED
	b. AUTO_INSTALL_IS_NOT_ALLOWED
@nikDemyankov
Copy link
Member

These are great changes, thanks :) Now we have a candidate for v2 of the plugin :) But first I'll need to finish with v1.3.0...

Are you planning to do the similar changes in the iOS?

@nikDemyankov nikDemyankov added this to the v2.0.0 milestone Mar 8, 2016
@oratthumzap
Copy link
Author

hi,
currently we are currently focusing our work on the Android platform.
our iOS implementation is in the roadmap, but it's hard for me to give an accurate prediction to when it will be implemented

@oratthumzap oratthumzap closed this Mar 8, 2016
@oratthumzap oratthumzap reopened this Mar 8, 2016
@oratthumzap
Copy link
Author

btw, i'm sorry about this big pull request.
some of the features could (and perhaps should) have been implemented incrementally but they all use the refactored code.
if more people request some of these changes, perhaps we can create a patch for independent features (for example: the concurrent file download) ;)

@nikDemyankov
Copy link
Member

currently we are currently focusing our work on the Android platform.

Understood, thanks for the info.

btw, i'm sorry about this big pull request.

No worries :) Just thinking ahead: if this is added to the plugin - same changes should be made in the iOS version. Otherwise we get inconsistency, which is bad. That's why I was asking about iOS.

But again, thanks for the PR :)

@nordnet-deprecation-bot
Copy link
Contributor

👋 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.

@nordnet nordnet locked and limited conversation to collaborators Sep 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants