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