react-native-nfc-manager icon indicating copy to clipboard operation
react-native-nfc-manager copied to clipboard

When scanning, AppState becomes background

Open valery-lavrik opened this issue 1 year ago • 5 comments

I have listening enabled

        AppState.addEventListener('change', (state) => {
                console.log('LOGAUT', state);
        });

When the scan event is triggered

    NfcManager
        .requestTechnology(NfcTech.Ndef);

Apostate becomes = 'background'

Is there any way to fix this?

valery-lavrik avatar Aug 26 '24 08:08 valery-lavrik

I guess you are on iOS and the answer is no. The OS puts your app in the background and its own scan dialog in the foreground.

btw: this type of question would be better suited for the newly created Disscussions Q&A format

pke avatar Sep 03 '24 14:09 pke

No, I use android

valery-lavrik avatar Sep 04 '24 06:09 valery-lavrik

Thats unexpected, since Android does not put up its own NFC dialogue in front of your app.

pke avatar Sep 04 '24 22:09 pke

Thats unexpected, since Android does not put up its own NFC dialogue in front of your app.

But that's exactly what happens

valery-lavrik avatar Sep 05 '24 06:09 valery-lavrik

I've got the same issue (on android), its very annoying since i'm using the android presentation api for an external display, but when the app goes to background, the display goes away for a few miliseconds.

sweebee avatar Sep 19 '24 13:09 sweebee

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] avatar Dec 19 '24 02:12 github-actions[bot]

This issue was closed because it has been stalled for 5 days with no activity.

github-actions[bot] avatar Jan 04 '25 02:01 github-actions[bot]

Bump. Same here

przemoch-dev avatar Jan 20 '25 09:01 przemoch-dev