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
- fix: addListener/removeListeners native stubs for react-native 0.65 copmatibility Fixes #1288 — committed to react-native-device-info/react-native-device-info by mikehardy 3 years ago
- revert(ios/rndeviceinfo): removing ios listener stubs removes added stubs to allow NativeEventEmitter to work on iOS again resolves #1301 — committed to react-native-device-info/react-native-device-info by schie 3 years ago
- revert(ios/rndeviceinfo): removing ios listener stubs removes added stubs to allow NativeEventEmitter to work on iOS again resolves #1301 — committed to react-native-device-info/react-native-device-info by schie 3 years ago
- chore(release): 8.4.4 [skip ci] ## [8.4.4](https://github.com/react-native-device-info/react-native-device-info/compare/v8.4.3...v8.4.4) (2021-11-01) ### Bug Fixes * **internal/nativeinferface:** f... — committed to react-native-device-info/react-native-device-info by semantic-release-bot 3 years ago
- chore(release): 8.4.4 [skip ci] ## [8.4.4](https://github.com/react-native-device-info/react-native-device-info/compare/v8.4.3...v8.4.4) (2021-11-01) ### Bug Fixes * **internal/nativeinferface:** f... — committed to WictorWilnd/react-native-device-info by WictorWilnd a year ago
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
andremoveListener
? I’d be happy to implement it to make sure everything’s kosher.