Skip to content

NFC tags don't emit url events through Linking #26552

Closed
@cimitan

Description

@cimitan

React Native version:
All react-native versions

Steps To Reproduce

  1. Make sure your Android manifests contains the correct NDEF actions
<uses-permission android:name="android.permission.NFC" />
...
        <intent-filter>
          <action android:name="android.intent.action.VIEW" />
          <category android:name="android.intent.category.DEFAULT" />
          <category android:name="android.intent.category.BROWSABLE" />
          <data android:scheme="https" android:host="www.example.com" android:pathPrefix="/some-path/" />
          <data android:scheme="https" android:host="example.com" android:pathPrefix="/some-path/" />
          <data android:scheme="http" android:host="www.example.com" android:pathPrefix="/some-path/" />
          <data android:scheme="http" android:host="example.com" android:pathPrefix="/some-path/" />
          <data android:scheme="app" android:host="example" android:pathPrefix="/some-path/" />
          <data android:scheme="app" android:host="com.example" android:pathPrefix="/some-path/" />
        </intent-filter>
        <intent-filter>
          <action android:name="android.nfc.action.NDEF_DISCOVERED" />
          <category android:name="android.intent.category.DEFAULT" />
          <category android:name="android.intent.category.BROWSABLE" />
          <data android:scheme="https" android:host="www.example.com" android:pathPrefix="/some-path/" />
          <data android:scheme="https" android:host="example.com" android:pathPrefix="/some-path/" />
          <data android:scheme="http" android:host="www.example.com" android:pathPrefix="/some-path/" />
          <data android:scheme="http" android:host="example.com" android:pathPrefix="/some-path/" />
        </intent-filter>
  1. Scan a NFC tag with an URL
  2. Check if Linking.addEventListener('url', ({url}) => console.warn('event url': url)) gets called

Describe what you expected to happen:
I see a console.warn

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    API: LinkingBugStaleThere has been a lack of activity on this issue and it may be closed soon.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions