Alternative to the deprecated AudioManager.isWiredHeadsetOn?

后端 未结 6 1462
暗喜
暗喜 2021-02-13 20:47

The method AudioManager.isWiredHeadsetOn() is deprecated from api level 14, how do we now detect if a wired headset is connected?

6条回答
  •  挽巷
    挽巷 (楼主)
    2021-02-13 21:12

    we have to be using broadcast Receivers for finding the status of bluetooth connection.

    Here is a good example

提交回复
热议问题