Save the date! Android Dev Summit is coming to Mountain View, CA on November 7-8, 2018.

AndroidThings

public final class AndroidThings
extends Object

java.lang.Object
   ↳ com.google.android.things.AndroidThings


Android Things library information.

This library lives on the device and is linked at runtime to the app, so it may be a different version than what the app was compiled against. This class provides a way to query the version of the library installed on the device and used at runtime, similar to android.os.Build.VERSION but specific to the Android Things library.

Summary

Nested classes

class AndroidThings.Product

AndroidThings product information. 

Fields

public static final int PREVIEW_SDK_INT

Android Things preview SDK version number.

public static final String RELEASE

Android Things release version string.

public static final int SDK_INT

Android Things SDK version number.

Inherited methods

From class java.lang.Object

Fields

PREVIEW_SDK_INT

int PREVIEW_SDK_INT

Android Things preview SDK version number.

Indicates the Android Things SDK preview version, just as android.os.Build.VERSION.PREVIEW_SDK_INT does for the Android SDK. Preview SDKs may contain additional APIs in addition to those indicated by SDK_INT, but these APIs should be considered unstable and may change or disappear in future releases.

See also:

RELEASE

String RELEASE

Android Things release version string.

The version string is primarily for display and informational purposes and should not be used to determine what functionality exists on the device.

SDK_INT

int SDK_INT

Android Things SDK version number.

Indicates which Android Things APIs are available on the device, just as android.os.Build.VERSION.SDK_INT does for Android APIs. This allows callers to use new APIs if available and fall back to older APIs otherwise:

 if (AndroidThings.SDK_INT >= 5) {
   // Use APIs introduced in Android Things API version 5.
 } else {
   // Fall back to older APIs.
 }
 

See also: