Created
May 13, 2020 16:37
-
-
Save SanojPunchihewa/42e6adb1d45fecbb1032db3062ea12ee to your computer and use it in GitHub Desktop.
Add UpdateInfoListener
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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