Skip to content

Most visited

Recently visited

navigation

AndroidThings

AndroidThings

public final class AndroidThings
extends Object

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


AndroidThings 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.

Summary

Public methods

static int getVersionMajor()

Gets the major version number.

static int getVersionMinor()

Gets the minor version number.

static int getVersionRevision()

Gets the version revision number.

static String getVersionString()

Returns the full library version as a string.

static String getVersionTag()

Gets the version tag.

Inherited methods

From class java.lang.Object

Public methods

getVersionMajor

int getVersionMajor ()

Gets the major version number. A major version bump indicates additional APIs have been added, but the library will still be backwards-compatible with previous major API versions.

Returns
int The major library version number.

getVersionMinor

int getVersionMinor ()

Gets the minor version number. A minor version bump indicates internal changes such as bugfixes or other improvements. No additional APIs will be added but some behavior may change.

Returns
int The minor library version number.

getVersionRevision

int getVersionRevision ()

Gets the version revision number. A non-zero revision number indicates a special sub-releases made for a specific purpose. These releases should typically only be used for their designated purpose, as they may introduce test APIs and behaviors (similar to getVersionTag()).

Returns
int The library version revision number.

getVersionString

String getVersionString ()

Returns the full library version as a string. Includes the major and minor versions and the tag. The string format may change between library versions; use the individual component accessors instead for programmatic version checks.

Returns
String The library version string.

getVersionTag

String getVersionTag ()

Gets the version tag. A tag provides additional information about the library. Tags will be an empty string on stable releases; if non-empty then the library may contain test APIs or behaviors.

Returns
String The library version tag.
This site uses cookies to store your preferences for site-specific language and display options.

Get the latest Android developer news and tips that will help you find success on Google Play.

* Required Fields

Hooray!

Browse this site in ?

You requested a page in , but your language preference for this site is .

Would you like to change your language preference and browse this site in ? If you want to change your language preference later, use the language menu at the bottom of each page.

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.

Take a short survey?
Help us improve the Android developer experience.
(Sep 2017 survey)