question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Scanning NFC tags always produces "Open Link?" confirmation pop-up (is it a bug?)

See original GitHub issue

Home Assistant Android version: 2.3.0-306-full Android version: 10 Phone model: Pixel 2 Home Assistant version: 0.114.4 Last working Home Assistant release (if known): N/A Description of problem: Not sure if it’s a bug or not, but any time I scan an NFC tag, I get a confirmation dialog titled “Open Link?”. I have the option to “Cancel” or “Open link”. When I tap “Open link”, an intent appears that’s clearly part of Home Assistant app, and the event fires successfully.

My expectation (or rather, my “hope”) is that if my phone is unlocked, I should be able to scan a tag, and have the event fire without any interaction from me.

I’m guessing this is a security measure on Android that can’t be disabled, but I thought I would post the issue in the hopes that it’s something that can be changed.

Traceback (if applicable):


Screenshot of problem: image Additional information: I’ve verified that the “Open by default” settings show that opening links is set to open in the app, and that "www.home-assistant.io is listed as a supported link (see screenshot)

image

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:47 (16 by maintainers)

github_iconTop GitHub Comments

3reactions
JayNewstromcommented, Sep 8, 2020

It’s worth noting this only happens with https urls (home assistant related or not). If I write another NFC tag with a custom scheme (homeassistanttestapp://tag/abc-def-etc) then it goes straight to the application, without interception. I wonder if it would be worth adding a configuration to do the universal NFC links or a custom scheme.

2reactions
fcassirercommented, Sep 22, 2020

I think I have it working for both Android and IOS, no pop-ups. So on Android I downloaded an app called NFC Tag Writer and it has an option to read a tag, save it in a local data store and then write it back. I wrote the tag written by HA back to another NFC tag and then used the saved link in ‘My datasets’ to write a clone of the tag. I then added an application via the checkbox in the datastore ‘Add launch application’ to launch to the tag. This appears to have added 52 bytes of metadata which shows HA as the launch app. When I now tap that tag, it works without the popup. It also works on IOS.

I suspect we just need to see if the HA tag writer can add this additional metadata when writing the tag.

FYI: This is an NFC AAR record.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Open NFC URL without confirmation (Android 11)
Scanning NFC tags always produces "Open Link?" confirmation pop-up (is it a bug?) opened 12:30AM - 03 Sep 20 UTC.
Read more >
NFC reads once, then no longer works. - Apple Developer
I create a personal automation in Shortcuts with an NFC tag. Works great the first time. Then it never reads it again. If...
Read more >
NFC tag detected? - MacRumors Forums
I got a notification that a NFC tag was detected with a link to click on it. I have never seen this before,...
Read more >
NFC basics - Android Developers
When an Android-powered device scans an NFC tag containing NDEF formatted data, it parses the message and tries to figure out the data's ......
Read more >
pop up saying NFC tag type not supported - Samsung Galaxy S5
The most likely answer is that you have placed an unregistered Credit Card, points card, access card that has a scanning tag too...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found