gpt4 book ai didi

android - 谁能告诉我 "on O+ for instant apps"是什么意思?

转载 作者:搜寻专家 更新时间:2023-11-01 09:24:34 26 4
gpt4 key购买 nike

以下资料来自Android Developer's page .我想在下面的上下文中理解什么是“O+”。是奥利奥之类的吗?

updateAppInfo

void updateAppInfo (Context context)

Updates application info based on currently installed splits.

Note #1: This method must be called after split is installed on O+ for instant apps, so that application components can see new resources and code from new splits.

Note #2: This method will update application info reference in application thread object.

Note #3: This method should only be called on O+.

Example usage:

 // SplitInstallAPI callbacks
public void onStateUpdate(SplitInstallSessionState splitInstallSessionState) {
if (splitInstallSessionState.status() == SplitInstallSessionStatus.INSTALLED) {
// Use SplitInstallHelper API on O+ to update application info after the splits are
// installed.
if (BuildCompat.isAtLeastO()) {
// Updates app info with new split information making split artifacts available to the
// app on subsequent requests.
SplitInstallHelper.updateAppInfo(context);
}
}
}

最佳答案

是的。在这种情况下,O 是 Oreo 的缩写。 Android 的每个主要版本(从 1.2 开始)都以甜点或其他甜食命名,版本号为 codenamed in alphabetical orderC for Cupcake 开始.版本通常会缩短到它们的第一个字母以便快速引用,或者在版本名称尚未确定时(目前是 Android P 的情况)。

因此在您的示例中,函数 BuildCompat.isAtLeastO() 检查当前设备是否至少运行 Android Oreo(API 级别 26)。

关于android - 谁能告诉我 "on O+ for instant apps"是什么意思?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51671403/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com