Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide available version code #7

Closed
cmkweber opened this issue Oct 30, 2019 · 8 comments
Closed

Provide available version code #7

cmkweber opened this issue Oct 30, 2019 · 8 comments

Comments

@cmkweber
Copy link

This is exposed by the AppUpdateManager:

https://developer.android.com/reference/com/google/android/play/core/appupdate/AppUpdateInfo.html#availableVersionCode()

@jonasbark
Copy link
Owner

Can you think of a use case where this would be useful?

@cmkweber
Copy link
Author

One use case is to only force update if the version number is behind on major, or minor version, but not force if only patch version has changed. With the version number the developer can determine if update is required or not.

@jonasbark
Copy link
Owner

True on that, but there's no way to tell if it's a minor or major release based on the version code alone? That would only work if the developer has a specific way of using the code (instead of just incrementing it).
The version name isn't exposed unfortunately.

@cmkweber
Copy link
Author

Does it not report the whole version string like: 1.0.0 - as it does on the Play Store page?

@cmkweber
Copy link
Author

My mistake, I didn't thoroughly review what it was reporting, it looks like they just report an integer, not sure why. I'll close this since unfortunately they aren't providing the whole version string.

@jonasbark
Copy link
Owner

I reopened it again - if there's interest and someone finds a legit use case, then I'll make sure it's implemented 👍

@jonasbark jonasbark reopened this Oct 31, 2019
@creativecreatorormaybenot
Copy link
Contributor

@jonasbark

In my current implementation, I check against the backend if the outdated version of the app needs to be updated (a newer version is set as required by the backend). If so, I check if there is an in-app update available.
With the current implementation, I just assume that the available in-app update meets the version requirement defined by my backend (which is reasonable), but it would of course be epic if I could validate that using the package :)

@jonasbark
Copy link
Owner

1.1.4 has just been uploaded with this feature 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants