AppVersionFetcher

public final class AppVersionFetcher
extends Object

java.lang.Object
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