Steps to Reproduce:
1. Launch an app that uses react-native-nfc-manager to check NFC state.
2. Disable NFC from the Quick Settings / Notification Panel while the app is running.
3. Observe that the app does not receive any events about the state change
Expected Behavior:
The app should receive a state change event (e.g., onStateChanged) when NFC is toggled via the Quick Settings / Notification Panel.
Actual Behavior:
No event is fired. Apps can only detect NFC state on focus/resume or by polling.
Possible Solutions:
useEffect(() => {
const listener = NfcManager.onStateChanged((state) => {
console.log('NFC state changed:', state);
});
return () => {
listener.remove();
};
}, []);