2

The following information is from Android Developer's page. I like to understand What "O+" in the context below. Is it version like Oreo?

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);
      }
    }
  }
Sujatha Girijala
  • 1,141
  • 8
  • 20
Kirk Kim
  • 21
  • 1

2 Answers2

2

Yes. In this case O is short for Oreo. Each major version of Android (from 1.2 onwards) is named after a dessert or other sweet food, and versions are codenamed in alphabetical order starting with C for Cupcake. Versions are often shortened down to their first letter for quick reference, or when the version name has not yet been decided (which is currently the case for Android P).

So in your example, the function BuildCompat.isAtLeastO() checks that the current device is running at least Android Oreo (API level 26).

Tim
  • 41,901
  • 18
  • 127
  • 145
Michael Dodd
  • 10,102
  • 12
  • 51
  • 64
0

Instant apps is a mini-application that does not need to be installed. Not all standard methods can work in it.

UgAr0FF
  • 805
  • 8
  • 18