AppVersionFetcher

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)

ดึงข้อมูลสตริงเวอร์ชันแอปพลิเคชันตามชื่อแพ็กเกจ

ตัวสร้างแบบสาธารณะ

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