私は私のHTCヒーロー2.1
モデルとの奇妙な問題を抱えている= HERO200
メーカーに報告していない= HTC
APILevelはそれがあること7
アンドロイドHTCヒーローが戻って正しいFeatureInfo
をバック報告していません= ハードウェアマイクがあります。ここで私のコードは、機能を確認することです。
android.hardware.camera
android.hardware.wifi
android.hardware.location.network
android.hardware.bluetooth
android.hardware:
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
Context context = this;
PackageManager pm = context.getPackageManager();
FeatureInfo[] foo = pm.getSystemAvailableFeatures();
for (FeatureInfo bar : foo) {
if (bar.name != null) {
System.out.println(bar.toString());
if (bar.name.equalsIgnoreCase("android.hardware.microphone"))
System.out.println("Booyah!");
}
}
}
それはバックレポートこれらの機能を行います。センサ0120- android.hardware.touchscreen.multitouch
android.hardware.touchscreen
android.hardware.sensor.accelerometer
android.hardware.sensor.compass
は、いくつかのコンパスとGPSのようなAPIレベル8であり、他のものはレベル7です。機能を検索する別の方法はありますか?私はgetSystemAvailableFeatures()のほかに何かを使用できますか?おそらく低レベルのシステムコール?なぜ私の電話は、それがハードウェアマイクを持っていることを報告していないのですか?ヘルプしてください:)ありがとう!