AppVersionFetcher

public final class AppVersionFetcher
extends Object

java.lang.オブジェクト
com.android.tradefed.util.AppVersionFetcher


デバイスからアプリのバージョン文字列を取得するユーティリティ クラス。

dumpsys パッケージ コマンドをデバイスに送信し、返された結果の文字列を解析します。

まとめ

入れ子になったクラス

enum AppVersionFetcher.AppVersionInfo

アプリのバージョン情報の種類。

パブリックコンストラクター

AppVersionFetcher ()

パブリックメソッド

static String fetch (ITestDevice device, String packageName, AppVersionFetcher.AppVersionInfo info)

パッケージ名に基づいてアプリケーションのバージョン文字列を取得します。

パブリックコンストラクター

AppVersionFetcher

public AppVersionFetcher ()

パブリックメソッド

フェッチ

public static String fetch (ITestDevice device, 
                String packageName, 
                AppVersionFetcher.AppVersionInfo info)

パッケージ名に基づいてアプリケーションのバージョン文字列を取得します。

パラメーター
device ITestDevice : ITestDevice、デバイス インスタンス

packageName String : 文字列、パッケージ名

info AppVersionFetcher.AppVersionInfo : AppVersionInfo、アプリのバージョン情報タイプ

戻り値
Stringパッケージのバージョン文字列

投げる
DeviceNotAvailableException