Issue
The official document says:
The Android Emulator doesn't include virtual hardware for the following:
Bluetooth
NFC
SD card insert/eject
Device-attached headphones
USB
However, the emulator has the following settings:
Could anyone shed some light on what these settings mean? The following code returns false for the emulator:
getPackageManager().hasSystemFeature(PackageManager.FEATURE_MICROPHONE)
Solution
I was looking for a way to make Android think I have connected headphones but enabling Virtual headset plug inserted
is not enough. Do do that you have to install Lesser AudioSwitch and set input device to headset
Only then getPackageManager().hasSystemFeature(PackageManager.FEATURE_MICROPHONE)
will return true
Answered By - druss
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.