简体   繁体   English

在Android上检测到使用蓝牙耳机或扬声器拨打的电话

[英]Detected phone call taken with bluetooth headset or speaker on Android

I can already detect when an Android phone makes or takes a phone call, but I would also like to know if a bluetooth headset is being used for the call and/or if the phone's speaker is being used for the call. 我已经可以检测到Android手机何时拨打或接听电话,但是我也想知道是否使用蓝牙耳机通话和/或是否使用了手机的扬声器。 I have looked around a bit but I don't see anything that can do this. 我环顾了一下,但看不到有什么可以做到的。 Is this possible? 这可能吗?

我认为您可以使用AudioManager的isBluetoothScoOn(),它应该可以正常工作。

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM