public static class

Build.CM_VERSION_CODES

extends Object
java.lang.Object
   ↳ cyanogenmod.os.Build.CM_VERSION_CODES

Class Overview

Enumeration of the currently known SDK version codes. These are the values that can be found in SDK_INT. Version numbers increment monotonically with each official platform release. To programmatically validate that a given API is available for use on the device, you can quickly check if the SDK_INT from the OS is provided and is greater or equal to the API level that your application is targeting.

Example for validating that Profiles API is available

 private void removeActiveProfile() {
     Make sure we're running on BoysenBerry or higher to use Profiles API
     if (Build.CM_VERSION.SDK_INT >= Build.CM_VERSION_CODES.BOYSENBERRY) {
         ProfileManager profileManager = ProfileManager.getInstance(this);
         Profile activeProfile = profileManager.getActiveProfile();
         if (activeProfile != null) {
             profileManager.removeProfile(activeProfile);
         }
     }
 }
 

Summary

Constants
int APRICOT June 2015: The first version of the platform sdk for CyanogenMod
int BOYSENBERRY September 2015: The second version of the platform sdk for CyanogenMod

Applications targeting this or a later release will get these new features:

int CANTALOUPE November - December 2015: The third iteration of the platform sdk for CyanogenMod Transition api level that is mostly 1:1 to BOYSENBERRY
int DRAGON_FRUIT January 2016: The 4th iteration of the platform sdk for CyanogenMod

Applications targeting this or a later version will get access to these new features:

  • External views api, and specifically Keyguard interfaces for making live lockscreens via KeyguardExternalView
  • Inclusion of the PerformanceManager interfaces, allowing an application to specify the type of mode to have the device be placed in via PerformanceManager
  • Numerous new "System" settings exposed via the CMSettings.System interface
int ELDERBERRY April 2016: The 5th iteration of the platform sdk for CyanogenMod

Applications targeting this or a later version will get access to these new features!

  • Weather request api to fetch weather data from providers on the device CMWeatherManager
  • Weather provider api to provide weather data to any listener on the device WeatherProviderService
  • Extended capabilities of the KeyguardExternalView interfaces to provide immersive and interactive experiences on the lockscreen.
int FIG August 2016: The 6th iteration of the platform sdk for CyanogenMod

Applications targeting this or a later version will get access to these new features!

Signing out, Adnan ✌
Public Constructors
Build.CM_VERSION_CODES()
[Expand]
Inherited Methods
From class java.lang.Object

Constants

public static final int APRICOT

Added in API level 1

June 2015: The first version of the platform sdk for CyanogenMod

Constant Value: 1 (0x00000001)

public static final int BOYSENBERRY

Added in API level 2

September 2015: The second version of the platform sdk for CyanogenMod

Applications targeting this or a later release will get these new features:

Constant Value: 2 (0x00000002)

public static final int CANTALOUPE

Added in API level 3

November - December 2015: The third iteration of the platform sdk for CyanogenMod Transition api level that is mostly 1:1 to BOYSENBERRY

Constant Value: 3 (0x00000003)

public static final int DRAGON_FRUIT

Added in API level 4

January 2016: The 4th iteration of the platform sdk for CyanogenMod

Applications targeting this or a later version will get access to these new features:

  • External views api, and specifically Keyguard interfaces for making live lockscreens via KeyguardExternalView
  • Inclusion of the PerformanceManager interfaces, allowing an application to specify the type of mode to have the device be placed in via PerformanceManager
  • Numerous new "System" settings exposed via the CMSettings.System interface

Constant Value: 4 (0x00000004)

public static final int ELDERBERRY

Added in API level 5

April 2016: The 5th iteration of the platform sdk for CyanogenMod

Applications targeting this or a later version will get access to these new features!

  • Weather request api to fetch weather data from providers on the device CMWeatherManager
  • Weather provider api to provide weather data to any listener on the device WeatherProviderService
  • Extended capabilities of the KeyguardExternalView interfaces to provide immersive and interactive experiences on the lockscreen.
  • Themes interfaces have found a new home in the cmsdk, thus we allow access to 3rd parties requesting theme changes on the platform via ThemeManager and ThemeChangeRequest
  • Full access to the ThemesContract and provider
  • Parceling helper class Concierge to help with parcel headers and protocol revisions

Constant Value: 5 (0x00000005)

public static final int FIG

Added in API level 6

August 2016: The 6th iteration of the platform sdk for CyanogenMod

Applications targeting this or a later version will get access to these new features!

Signing out, Adnan ✌

Constant Value: 6 (0x00000006)

Public Constructors

public Build.CM_VERSION_CODES ()

Added in API level 1