Skip to content

Instantly share code, notes, and snippets.

@SanojPunchihewa
Created May 13, 2020 16:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save SanojPunchihewa/42e6adb1d45fecbb1032db3062ea12ee to your computer and use it in GitHub Desktop.
Save SanojPunchihewa/42e6adb1d45fecbb1032db3062ea12ee to your computer and use it in GitHub Desktop.
Add UpdateInfoListener
mUpdateManager.addUpdateInfoListener(new UpdateInfoListener() {
@Override
public void onReceiveVersionCode(final int code) {
// You can get the available version code of the apk in Google Play
// Do something here
}
@Override
public void onReceiveStalenessDays(final int days) {
// Number of days passed since the user was notified of an update through the Google Play
// If the user hasn't notified this will return -1 as days
// You can decide the type of update you want to call
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment