简体   繁体   English

如何检查android设备是否有录音?

[英]How to check whether the sound recording is available in a android device.?

Is there a standard way to check whether the sound recording is possible in a android device?是否有标准方法来检查 android 设备中是否可以录音?

If you absolutely need a device to have a microphone, add a <uses-feature> element to your manifest asking for android.hardware.microphone .如果您绝对需要设备有麦克风,请在清单中添加一个<uses-feature>元素,要求android.hardware.microphone

If you could use a microphone if it exists, then add a <uses-feature> element to your manifest asking for android.hardware.microphone with android:required="false" .如果您可以使用麦克风(如果存在),则在清单中添加一个<uses-feature>元素,要求android.hardware.microphoneandroid:required="false" Then, use PackageManager and hasSystemFeature() to check for android.hardware.microphone at runtime.然后,使用PackageManagerhasSystemFeature()在运行时检查android.hardware.microphone

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何检查 SIM 卡是否可用于 Android 设备? - How can I check whether the Sim Card is available in an android device? 声音在Android设备上无效。 在模拟器上正常工作 - Sound won't work on android device. Works fine on emulator Android 检查设备上是否可以使用 intent RECORD_SOUND_ACTION - Android check if using intent RECORD_SOUND_ACTION is available on device 如何检查WiFi网络中是否有ChromeCast设备? - How to check whether a ChromeCast device is available in the wifi network? 如何检查Android设备上的网络何时不可用? - How to check when network is not available on android device? 如何检查Android设备上是否有Google身份验证器? - how to check if Google authenticator is available on a Android device? Android:如何检查设备上是否有闪光灯? - Android: how to check the flash light is available on device? 如何检查arrayList的单词是否在Android的EditText中可用 - How to check that whether words of arrayList are available in EditText in android Android - 根据设备在画布上定位位图。 如何处理? - Android - Positioning Bitmaps on canvas varying per device. How to handle? Android - 如何在录像开始时禁用声音? - Android - How to disable sound on video recording start?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM