AyogoHealth / cordova-plugin-update-notifier

Cordova plugin for showing a notification for app updates.
Apache License 2.0
27 stars 10 forks source link

Feat: provide promise method to call update popup on other page #5

Closed indraraj26 closed 4 years ago

dpogue commented 4 years ago

Hi @indraraj26, This should be a fairly straightforward thing to support, but I don't think we want to add this feature to the plugin.

To explain my reasoning here: This plugin is intentional designed to be as easy to use as possible, requiring no JS code in the application. You can install it, and it works automatically with no extra steps. Adding a JS API increases the scope of the plugin behaviour, and means more maintenance and testing and documentation on our side to support multiple use cases. It also involves more work for the plugin users to figure out how and when to initialize the plugin.

That said, I suspect there are a number of people who would like more control over exactly when to check for updates. What I would recommend doing is forking this plugin, adding the JavaScript API to trigger the check for updates, and publishing to npm under a different name. If someone does that, please leave a link here to the modified plugin and I'll add it to the README on this repo so other users wanting more control can find it. 🙂