Sdk.VERSION

public static final class Sdk.VERSION
extends Object

java.lang.Object
   ↳ com.google.wear.Sdk.VERSION


Version constants for Wear SDK used to determine API availability/compatibility.

Summary

Fields

public static final int RELEASE

The version corresponding to the incremental library update within the same platform version (Android API level) on which the library is built.

public static final int WEAR_SDK_INT

The version of the Wear SDK software running on this device.

Public methods

static boolean isIncrementalRelease()

Check to see if the current version corresponds to an incremental API release.

Inherited methods

Fields

RELEASE

Added in version 34.1
public static final int RELEASE

The version corresponding to the incremental library update within the same platform version (Android API level) on which the library is built. In traditional semantic versioning, if the Build.VERSION.SDK_INT version is considered a major revision, RELEASE can be thought of as minor.

This value will reset to 0 whenever the platform version is incremented following a major Android platform (API level) release and will increase monotonically in correspondence with subsequent Wear platform SDK updates. These updates are scheduled to occur roughly quarterly, but the specific schedule may vary.

This is intended for use by users to qualify the availability of APIs which may be added since the last incremental release within a platform API level.

WEAR_SDK_INT

Added in version 33.2
public static final int WEAR_SDK_INT

The version of the Wear SDK software running on this device. Similar to Android's Build.VERSION.SDK_INT, this value never changes while a device is booted, but it may increase when the hardware manufacturer provides an OTA update.

This version increases monotonically with each release of the Wear SDK.

Public methods

isIncrementalRelease

Added in version 33.1
public static boolean isIncrementalRelease ()

Check to see if the current version corresponds to an incremental API release. An incremental API release signifies that the platform may contain API changes which have occurred since the last major Android API release.

If the release is not an incremental release, then the available API will correspond to that matching the corresponding Android API release - i.e. use Build.VERSION.SDK_INT in determining API availability.

If the release is an incremental release, then developers should check SdkExtensions.getExtensionVersion(int) in order to accurately determine API availability.

Returns
boolean true if this is an incremental API release (i.e. API changes outside of a major, Android platform API release) otherwise false.