I'm trying to implement in-app updates using the play-core library. I'm using the dependency
implementation 'com.google.android.play:core:1.5.0'
And here is the code I'm using to check for the updates
val updateManager = AppUpdateManagerFactory.create(this)
updateManager.appUpdateInfo.addOnSuccessListener {
//code to run is its successful
}.addOnFailureListener {
//something wrong happened
it.printStackTrace()
}
Onsuccess
is called for some devices but on some onFailedListener
is called and it throws this error
com.google.android.play.core.install.InstallException: Install Error: -6