如何指定哪些更新需要立即更新,哪些更新可以灵活地使用 Google 的应用内更新 API?

How to specify which updates need to be updated immediately and which ones are flexible with Google's in app update API?

我已按照 Google 网站上的步骤转到 support in app updates。但是,我仍然对如何指定哪些更新是 "immediate" 以及哪些更新是 "flexible" 感到困惑。我在 Google Play Developer Console 的任何地方都没有看到标志。还是我应该自己编写 API 来根据版本代码检查我的服务器?

这是我的实现:

        appUpdateManager.appUpdateInfo.addOnSuccessListener { updateInfo ->
        Log.e("launcher", "appUpdateInfo $updateInfo")
        Log.e("launcher", "updateAvailablility ${updateInfo.updateAvailability()}")
        Log.e("launcher", "availableVersion ${updateInfo.availableVersionCode()}")
        if (updateInfo.updateAvailability()
                == UpdateAvailability.DEVELOPER_TRIGGERED_UPDATE_IN_PROGRESS) {
            // If an in-app update is already running, resume the update.
            appUpdateManager.startUpdateFlowForResult(
                    updateInfo,
                    IMMEDIATE,
                    this,
                    REQUEST_UPDATE);
        } else if (updateInfo.updateAvailability() == UpdateAvailability.UPDATE_AVAILABLE && updateInfo.isUpdateTypeAllowed(IMMEDIATE)) {
            appUpdateManager.startUpdateFlowForResult(updateInfo, IMMEDIATE, this, REQUEST_UPDATE)
        } else if (updateInfo.updateAvailability() == UpdateAvailability.UPDATE_AVAILABLE && updateInfo.isUpdateTypeAllowed(FLEXIBLE)) {
            dialog(getString(R.string.update_recommended_title), getString(R.string.update_required_content), getString(R.string.update_required_positive), {
                appUpdateManager.startUpdateFlowForResult(updateInfo, FLEXIBLE, this, REQUEST_UPDATE)
            }, getString(R.string.update_recommended_negative), {
            })

        }
    }

今天需要使用自己的API或者在versionCode中进行编码