Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

`com.google.android.play.core.install.InstallException: Install Error: -6` when using in-app updates [duplicate]

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

like image 840
Ememobong AkpanEkpo Avatar asked Jun 13 '19 10:06

Ememobong AkpanEkpo


1 Answers

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)

like image 113
Manoj Perumarath Avatar answered Oct 22 '22 05:10

Manoj Perumarath