问题
I'm working with In-App update from here: https://developer.android.com/guide/app-bundle/in-app-updates
I have successfully implemented it in my app. My app is already in playstore: https://play.google.com/store/apps/details?id=com.tekitsolution.remindly
for Testing this implementation, I decreased version in my project and I implemented in Splash Activity.
So, I got the update screen, I click on update and it started downloading. After completing the download, it is again coming same page to download and installErrorCode
is getting -100 which means An internal error happened in the Play Store. (Is there a way to understand what install error codes actually mean?)
Flow from update screen:
I printed logs for `state.installStatus()`
PENDING = 1;
DOWNLOADING = 2;
DOWNLOADED = 11;
INSTALLING = 3;
then instead of this (INSTALLED = 4), I'm getting FAILED = 5 with state.installErrorCode -100
Code:
private InstallStateUpdatedListener installStateUpdatedListener = new
InstallStateUpdatedListener() {
@Override
public void onStateUpdate(InstallState state) {
showLog("In-App: " + state.installStatus());
showLog("installErrorCode " + state.installErrorCode());
if (state.installStatus() == InstallStatus.DOWNLOADED) {
popupSnackbarForCompleteUpdate();
} else if (state.installStatus() == InstallStatus.INSTALLED) {
if (mAppUpdateManager != null) {
showLog("In-App: unregisterListener");
mAppUpdateManager.unregisterListener(installStateUpdatedListener);}
}
}
};
Note: I tried with different devices also.
来源:https://stackoverflow.com/questions/58517654/how-to-solve-install-status-code-100-while-working-with-in-app-update-in-androi