AyogoHealth / cordova-plugin-update-notifier

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

Please update documentation on how to use the plugin #3

Open tahirQaiser opened 4 years ago

tahirQaiser commented 4 years ago

Currently, this plugin is not much documented, For a Junior Developer like me, if the plugin has good documentation it would be easy to use. Can you please document it properly ? Like how to use In App Updates ? How to use Flexible & Immediate updates using this plugin ?

dpogue commented 4 years ago

Hi @rajatahirqaiser, thanks for pointing out gaps in the current documentation. I will try to update the README with more details in the next few days. In the meantime, to try to answer some of your questions:

tahirQaiser commented 4 years ago

Thanks for a detailed response, For me I installed the plugin. It POP Ups as Update Available -> Download -> Installs BUT AGAIN NEXT TIME it shows POP UP AGAIN when app is opened to download again and loop() but the app is not updated .

Can you please share step by step way to use the plugin, I am super confused

jdpsah commented 3 years ago

There is no documentation on how to use it . I got it that we just need to install the plugin then all other work it will handle . But how to use flexible and immediate update ?

dpogue commented 3 years ago

But how to use flexible and immediate update ?

On Android, you configure that per-version using the Play Store API.

On iOS, currently it does the default Siren behaviour, but there's a PR to make that configurable via config.xml.

CheckpointAccess commented 3 years ago

Anyone ever get this working properly on Android w/ Cordova? Documentation has still not been updated.

tahirQaiser commented 3 years ago

@CheckpointAccess , I found this to be working without any configuration needed. This will work if app is in real time deployed to Playstore and there is no release, can't be checked in DEV

CheckpointAccess commented 3 years ago

@CheckpointAccess , I found this to be working without any configuration needed. This will work if app is in real time deployed to Playstore and there is no release, can't be checked in DEV

Ok thank you! I have been trying it while in testing releases, that could explain why it's not working.

knoxwebies commented 2 years ago

@CheckpointAccess or @rajatahirqaiser is it working when the app is in internal testing?

tinemlakar commented 2 years ago

Hi. Is there a way to test this plugin (on both platforms) or it works only in production?

abnersouza commented 2 years ago

Hi. Is there a way to test this plugin (on both platforms) or it works only in production?

In iOS you can test using Xcode, just set the version of your app to be lower than the one you have published in the App Store. e.g if your actual version released is 1.1.0 you can run the app in the Xcode and set the version to be 1.0.0 and then open in the simulator you should see the update notifier.

One tip as well is that once you have it published, it will show the notifier when the latest version has been released for at least one day (24hrs).

For Android as far as I read it's not possible to verify when is not in production.

tinemlakar commented 2 years ago

I found this article regarding testing in android. https://developer.android.com/guide/playcore/in-app-updates/test

One tip as well is that once you have it published, it will show the notifier when the latest version has been released for at least one day (24hrs).

Is this true for both, App Store and Google play store? I just tested in production in google play (plugin v1.0.1) and it doesn't seem to work. It hasn't been 24 h though.

satinder1208 commented 2 years ago

Hi, I am using it on Android 9... I deployed it in production and then made another release to the play store (on play store I can see the update button for my app)... But, for me, it is not coming with any popup or anything... any idea how to debug?

felicienfrancois commented 2 years ago

@satinder1208 same issue with my app on my device (pixel 5 - android 12). And it does not seems to work on other devices too with my app (so may be app related). When debugging with logcat, it seems to always fallback in "getAppUpdateInfo: Unhandled case". https://github.com/AyogoHealth/cordova-plugin-update-notifier/blob/main/src/android/UpdateNotifierPlugin.java#L109

To further debug, we need to add more logs

satinder1208 commented 2 years ago

@felicienfrancois Just to add more info... it worked for me after 4-5 days... then it was giving me an alert every time I was opening the app until I clicked on Update. Still, I am not clear about the root cause of this delay. May the reading source is cached in the play store or something. so it works after a good time only

alanmilinovic commented 2 years ago

Same thing on my side. I can see app on the list of pending downloads with update button in Play store app, but no popup in app itself. Will wait for some time to see if it will start to work. It is not that usefull if it is not immediate and in sync with play store.

I also removed "Enable auto-update" from the app in Play Store app to prevent automatic update of the app and test things. My app is in release track.

dpogue commented 2 years ago

On Android, this is using Google's Play Core library which is the official flow for in-app updates. That library is responsible for all the update detection and notification, so any delays are unfortunately an issue with their library or their API 😞

alanmilinovic commented 2 years ago

That is a pitty, maybe they will improve it in the future.