Skip to content
This repository was archived by the owner on Nov 26, 2020. It is now read-only.

the suggested configuration doesn't catch the NFC event #1

Open
vaxxis opened this issue Mar 31, 2017 · 3 comments
Open

the suggested configuration doesn't catch the NFC event #1

vaxxis opened this issue Mar 31, 2017 · 3 comments

Comments

@vaxxis
Copy link

vaxxis commented Mar 31, 2017

Hi guys,
i've just tried to use your package which seems really promising and i don't know if there is something i'm doing wrong but i'm unable to catch the NFC events.

I've tried 3 types of NFC tags (NXP mifare & mifareultralight) but instead of catching the intent it opens the browser with the configured URL on the tags.

I've done the tests firstly on the latest 0.42.3 version then tried also on the 0.40.0.

Is there something i'm missing? Can you add an example project created with react-native init?

Thanks.

@giordy
Copy link
Member

giordy commented Apr 2, 2017

I see, one possibility is that the intent is being caught by the browser before it reaches your app.
You could try to be more precise with the filtering in the manifest, for example:

<intent-filter>
    <action android:name="android.nfc.action.NDEF_DISCOVERED"/>
    <category android:name="android.intent.category.DEFAULT"/>
    <data android:mimeType="text/html" />
</intent-filter>

Or

<data android:scheme="http" />

I will make a test asap.

@vaxxis
Copy link
Author

vaxxis commented Apr 2, 2017

Thanks for your reply @giordy, i'll try it right away.

@henrikra
Copy link

@vaxxis Did you solve this?

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

No branches or pull requests

3 participants