react-native-device-info: iOS useIsHeadphonesConnected not detecting lightning device or wired adapter

Summary

Version 8.3.1
Affected OS iOS
OS Version 14.7

Current behavior

Connecting a lightning jack-adapter or a lightning microphone won’t trigger any event. The useIsHeadphonesConnected(); hook always returns {"loading": false, "result": false}

Expected behavior

Connecting a lightning jack-adapter or a lightning microphone should return true on the result field of useIsHeadphonesConnected();

DEVICE NOT CONNECTED

{"loading": false, "result": false} = useIsHeadphonesConnected()

DEVICE CONNECTED

{"loading": false, "result": true} = useIsHeadphonesConnected()

NOTE:

Bluetooth headset or AirPods instead work perfectly

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 16 (9 by maintainers)

Commits related to this issue

Most upvoted comments

I’ll try to get to this over the weekend, but if anyone wants to be a hero… lol

Hello!

Since I wrote it, I can look into this.

I’m pretty sure that I tested this, maybe an API changed recently?

Do you know where the documentation is regarding addListener and removeListener ? I’d be happy to implement it to make sure everything’s kosher.