HTC Hero 2.1
モデル=HERO200
メーカー=HTC
APILevel=7で奇妙な問題が発生しています
ハードウェア マイクがあることを報告していません。機能を確認するコードは次のとおりです。
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!");
}
}
}
次の機能を報告します:
android.hardware.camera
android.hardware.wifi
android.hardware.location.network
android.hardware.bluetooth
android.hardware.sensor.light
android.hardware.location
android.hardware.location.gps
android hardware.camera.autofocus
android.hardware.touchscreen.multitouch
android.hardware.touchscreen
android.hardware.sensor.accelerometer
android.hardware.sensor.compass
コンパスや GPS のような API レベル 8 のものもあれば、レベル 7 のものもあります。機能を検索する別の方法はありますか? getSystemAvailableFeatures() 以外に使用できるものはありますか? 多分低レベルのシステムコール?ハードウェア マイクが搭載されていることを携帯電話が報告しないのはなぜですか? 助けてください:)ありがとう!