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.ProductAndroidThings product information. | 
| Fields | |
|---|---|
| 
    public
    static
    final
    int | PREVIEW_SDK_INTAndroid Things preview SDK version number. | 
| 
    public
    static
    final
    String | RELEASEAndroid Things release version string. | 
| 
    public
    static
    final
    int | SDK_INTAndroid 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.
See also:
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:
- Classes
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
