Skip to content

Unable to detect NFC toggle changes from Quick Settings / Notification Panel on Android #813

@jamalud-lab

Description

@jamalud-lab

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();
    };
  }, []);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions