inappupdate not available after skipping installation

偶尔善良 提交于 2019-12-13 03:30:56

问题


When Users downloads the app via Flexible app update

appUpdateManager?.startUpdateFlowForResult(it, AppUpdateType.FLEXIBLE, activity, REQUEST_CODE_FLEXI_UPDATE)

but forgets or accidentally skips to click the restart app button which does following:

            appUpdateManager?.completeUpdate()

Then app update is not available. Even I tried with clear app data, it doesn't work. Looks like once app is downloaded via inappupdate and skips installation, you're stuck, it doesn't ask again.

appUpdateManager?.appUpdateInfo?.addOnSuccessListener { appUpdateInfo ->
            if (appUpdateInfo.updateAvailability() == UpdateAvailability.UPDATE_AVAILABLE && appUpdateInfo.isUpdateTypeAllowed(AppUpdateType.FLEXIBLE)) {
                updateAvailable.value = true
            }
        }

Is there a solution to this? Other things are working and it's live on playstore just looking for solution of such use-case.

Also how to get progress value of app being downloaded, couldn't find it in documentation. In my case, onActivityResult keeps calling but which key gives progress value?

Also facing another issue with different use case: java.lang.reflect.InvocationTargetException while inappupdate android if retries

来源:https://stackoverflow.com/questions/57285370/inappupdate-not-available-after-skipping-installation

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!