AppInfo
public
final
class
AppInfo
extends Object
| java.lang.Object | |
| ↳ | androidx.car.app.AppInfo |
Container class for information about the app the host is connected to.
Hosts will use this information to provide the right level of compatibility, based on the application's minimum and maximum API level and its own set of supported API levels.
The application minimum API level is defined in the application's manifest using the following declaration.
<manifest ...>
<application ...>
<meta-data
android:name="androidx.car.app.min-api-level"
android:value="1" />
...
</application>
</manifest>
See also:
Summary
Public constructors | |
|---|---|
AppInfo(int minCarAppApiLevel, int latestCarAppApiLevel, String libraryVersion)
Creates an instance of |
|
Public methods | |
|---|---|
int
|
getLatestCarAppApiLevel()
|
String
|
getLibraryDisplayVersion()
String representation of library version. |
int
|
getMinCarAppApiLevel()
|
String
|
toString()
|
Inherited methods | |
|---|---|
Public constructors
AppInfo
public AppInfo (int minCarAppApiLevel,
int latestCarAppApiLevel,
String libraryVersion)
Creates an instance of AppInfo with the provided version information.
| Parameters | |
|---|---|
minCarAppApiLevel |
int: the minimal API level that can work with an app built with
the library |
latestCarAppApiLevel |
int: the latest API level the library supports |
libraryVersion |
String: the library artifact version
|
Public methods
getLatestCarAppApiLevel
public int getLatestCarAppApiLevel ()
| Returns | |
|---|---|
int |
|
getLibraryDisplayVersion
public String getLibraryDisplayVersion ()
String representation of library version. This version string is opaque and not meant to be parsed.
| Returns | |
|---|---|
String |
|
getMinCarAppApiLevel
public int getMinCarAppApiLevel ()
| Returns | |
|---|---|
int |
|
toString
public String toString ()
| Returns | |
|---|---|
String |
|