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
Check here in the developer docs
where Install Error: -6
means
The download/install is not allowed, due to the current device state (e.g. low battery, low disk space, ...).
Constant Value: -6 (0xfffffffa)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With