AaptParser

public class AaptParser
extends Object

java.lang.Object
com.android.tradefed.util.AaptParser


Lớp trích xuất thông tin từ apk bằng cách phân tích cú pháp đầu ra của 'huy hiệu kết xuất aapt'.

aapt phải trên PATH

Bản tóm tắt

Phương thức công khai

String getLabel ()
getNativeCode ()
String getPackageName ()
int getSdkVersion ()
int getTargetSdkVersion ()
String getVersionCode ()
String getVersionName ()
boolean isRequestingLegacyStorage ()

Kiểm tra xem ứng dụng có đang yêu cầu bộ nhớ cũ không.

boolean isUsingPermissionManageExternalStorage ()
static AaptParser parse (File apkFile, AaptParser.AaptVersion aaptVersion)

Phân tích thông tin từ apk.

static AaptParser parse (File apkFile)

Phân tích thông tin từ apk.

Phương thức công khai

lấy nhãn

public String getLabel ()

trả lại
String

getNativeCode

public  getNativeCode ()

trả lại

getPackageName

public String getPackageName ()

trả lại
String

getSdkVersion

public int getSdkVersion ()

trả lại
int

getTargetSdkVersion

public int getTargetSdkVersion ()

trả lại
int

getVersionCode

public String getVersionCode ()

trả lại
String

getVersionName

public String getVersionName ()

trả lại
String

isRequestingLegacyStorage

public boolean isRequestingLegacyStorage ()

Kiểm tra xem ứng dụng có đang yêu cầu bộ nhớ cũ không.

trả lại
boolean boolean trả về true nếu requestLegacyExternalStorage là true trong AndroidManifest.xml

isUsingPermissionManageExternalStorage

public boolean isUsingPermissionManageExternalStorage ()

trả lại
boolean

phân tích cú pháp

public static AaptParser parse (File apkFile, 
                AaptParser.AaptVersion aaptVersion)

Phân tích thông tin từ apk.

Thông số
apkFile File : tệp apk

aaptVersion AaptParser.AaptVersion : phiên bản aapt

trả lại
AaptParser AaptParser hoặc null nếu trích xuất thông tin không thành công

phân tích cú pháp

public static AaptParser parse (File apkFile)

Phân tích thông tin từ apk.

Thông số
apkFile File : tệp apk

trả lại
AaptParser AaptParser hoặc null nếu trích xuất thông tin không thành công