AppVersionFetcher
public
final
class
AppVersionFetcher
extends Object
java.lang.Object | |
↳ | com.android.tradefed.util.AppVersionFetcher |
Utility class to get app version string from device.
Send dumpsys package command to device, then parse the return result string.
Summary
Nested classes | |
---|---|
enum |
AppVersionFetcher.AppVersionInfo
App version info types. |
Public constructors | |
---|---|
AppVersionFetcher()
|
Public methods | |
---|---|
static
String
|
fetch(ITestDevice device, String packageName, AppVersionFetcher.AppVersionInfo info)
Fetch application version string based on package name. |
Public constructors
AppVersionFetcher
public AppVersionFetcher ()
Public methods
fetch
public static String fetch (ITestDevice device, String packageName, AppVersionFetcher.AppVersionInfo info)
Fetch application version string based on package name.
Parameters | |
---|---|
device |
ITestDevice : ITestDevice, device instance |
packageName |
String : String, package name |
info |
AppVersionFetcher.AppVersionInfo : AppVersionInfo, app version info type |
Returns | |
---|---|
String |
version string of the package |
Throws | |
---|---|
DeviceNotAvailableException |
Контент и образцы кода на этой странице предоставлены по лицензиям. Java и OpenJDK – это зарегистрированные товарные знаки корпорации Oracle и ее аффилированных лиц.
Последнее обновление: 2020-09-08 UTC.
[{
"type": "thumb-down",
"id": "missingTheInformationINeed",
"label":"Отсутствует нужная мне информация"
},{
"type": "thumb-down",
"id": "tooComplicatedTooManySteps",
"label":"Слишком сложен/слишком много шагов"
},{
"type": "thumb-down",
"id": "outOfDate",
"label":"Устарел"
},{
"type": "thumb-down",
"id": "translationIssue",
"label":"Проблема с переводом текста"
},{
"type": "thumb-down",
"id": "samplesCodeIssue",
"label":"Проблемы образцов/кода"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"Другое"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"Прост для понимания"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"Помог мне решить мою проблему"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"Другое"
}]