應用程式版本取得器
public final class AppVersionFetcher
extends Object
java.lang.Object | |
↳ | com.android.tradefed.util.AppVersionFetcher |
用於從裝置取得應用程式版本字串的實用程式類別。
向設備發送dumpsys包命令,然後解析返回結果字串。
概括
公共構造函數 | |
---|---|
AppVersionFetcher () |
公共方法 | |
---|---|
static String | fetch ( ITestDevice device, String packageName, AppVersionFetcher.AppVersionInfo info) 根據套件名稱取得應用程式版本字串。 |
公共構造函數
應用程式版本取得器
public AppVersionFetcher ()
公共方法
拿來
public static String fetch (ITestDevice device, String packageName, AppVersionFetcher.AppVersionInfo info)
根據套件名稱取得應用程式版本字串。
參數 | |
---|---|
device | ITestDevice :ITestDevice,設備實例 |
packageName | String : 字串,包名 |
info | AppVersionFetcher.AppVersionInfo :AppVersionInfo,應用程式版本資訊類型 |
退貨 | |
---|---|
String | 包的版本字串 |
投擲 | |
---|---|
DeviceNotAvailableException |