mateusfccp / update_available

Know if there's any update for your Flutter app, based on published versions.
MIT License
25 stars 16 forks source link

Feature - result useful information instead of void on update available #14

Open dtodt opened 2 years ago

dtodt commented 2 years ago

Hi, I wonder if there is any intention in return some information, that makes easier to use the package.

I was considering implement my in app update with this package, since upgrader is not flexible enough, but then I would need to make some code by hand, that seems duplicated to me.

I don't know if it is possible though.

With those information, I could build dialog messages, and redirect the client to the store.

Thanks in advance.

mateusfccp commented 2 years ago

Hello, @dtodt!

I think it is possible to return some additional information in the update availability object, yes. I am going to give a look if I can do this without having to add more dependencies, which would be ideal, as this package purpose is to be as unintrusive as possible.

Thanks for your suggestion!

milkyway044 commented 1 year ago

+1

mateusfccp commented 3 days ago

Any help for this issue is welcome. I've been investigating a possibility for this and this is what I found:

Android iOS
Installed version Can be obtained with PackageInfo Can be obtained (check what package_info_plus does)
Available version AppUpdateInfo has [availableVersionCode](https://developer.android.com/reference/com/google/android/play/core/appupdate/AppUpdateInfo#availableVersionCode()), but it only returns the version code, not the version string. Is already available for us, we just have to expose it.

So, basically what I'm not sure if we can solve properly is Android's available version. I am accepting suggestions about this.

Regarding app store URL, I'm not sure if I would like to include it, it may be too much for the objectives of this package, but I may change my mind.