我想顯示我的應用程序使用的設備功能信息。例如:像這樣如何在Android中獲取設備功能信息?
android.hardware.location.network
android.hardware.wifi
com.google.android.feature.GOOGLE_BUILD
android.hardware.telephony
android.hardware.location
android.software.sip
android.hardware.touchscreen.multitouch
glEsVersion = 2.0
信息,我用下面的代碼:
PackageManager packageManager = mcontex.getApplicationContext().getPackageManager();
FeatureInfo[] feature = packageManager.getSystemAvailableFeatures();
String k = null;
for (FeatureInfo s : feature) {
k = s.name + "\n" + "glEsVersion =" + s.reqGlEsVersion;
}
return k;
它只顯示glEsversion但休息吧表明空。任何建議?
FeatureInfo []的數組和字符串k爲信號變量從陣列 – MilapTank