private fun checkRecentVersion() {
val appUpdateManager = AppUpdateManagerFactory.create(this)
val appUpdateInfoTask = appUpdateManager.appUpdateInfo
appUpdateInfoTask.addOnSuccessListener { appUpdateInfo ->
if (appUpdateInfo.updateAvailability() == UpdateAvailability.UPDATE_AVAILABLE) {
setView(false, updateAvailability = appUpdateInfo.updateAvailability())
} else {
setView(true, updateAvailability = appUpdateInfo.updateAvailability())
}
}.addOnFailureListener {
setView(true, true, -100)
}
}
I check this code update my app upload in internal test. I want to update check use appUpdateManager. But it was return always 1(UPDATE_NOT_AVAILABLE). What is the problem this code? And if I use update internal test update, it can't usable this code?