Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NFC Plugin #405

Closed
elepetit opened this issue Jan 30, 2025 · 2 comments
Closed

NFC Plugin #405

elepetit opened this issue Jan 30, 2025 · 2 comments

Comments

@elepetit
Copy link

Hi,

On Ios everything is ok.
On Android, the message screen for reading card doesn't appear but the card is read;
Can you tell what i've not done correctly?

My code:
async asyncReadNfc(){
return new Promise((resolve) => {
Nfc.addListener('nfcTagScanned', async (event) => {
await Nfc.stopScanSession();
resolve(event.nfcTag);
});
Nfc.startScanSession();
});
}

Logcat:

To native (Capacitor plugin): callbackId: 38725514, pluginId: Nfc, methodName: addListener
callback: 38725514, pluginId: Nfc, methodName: addListener, methodData: {"eventName":"nfcTagScanned"}
To native (Capacitor plugin): callbackId: 38725515, pluginId: Nfc, methodName: startScanSession
callback: 38725515, pluginId: Nfc, methodName: startScanSession, methodData: {}

RefreshLastKeyboardType: 1
getCurrentKeyboardType: 1
Notifying listeners for event nfcTagScanned
Firing change: true
To native (Capacitor plugin): callbackId: 130352115, pluginId: Nfc, methodName: stopScanSession
callback: 130352115, pluginId: Nfc, methodName: stopScanSession, methodData: {}

@robingenz
Copy link
Member

Android does not provide such a message screen. You have to create one yourself (e.g. using Ionic alerts).

@robingenz robingenz closed this as not planned Won't fix, can't repro, duplicate, stale Jan 30, 2025
@elepetit
Copy link
Author

Ok, i've done with modal, many thank's for je job :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants