how to detect disconnection from NFC

General discussions about Automagic and automation in general

Moderator: Martin

Post Reply
nantzen
Posts: 1
Joined: 13 Feb 2017 10:57

how to detect disconnection from NFC

Post by nantzen » 16 Feb 2017 12:57

well, I know there is a trigger to detect if you are connected to a NFC tag (with a certain ID number) and I use this trigger to activate some action. But I didn't see a trigger that tell me that I am no more connected with the NFC tag (with a certain ID number) so that I can deactivate the previous action. Can someone help me?

User avatar
Scotty
Posts: 78
Joined: 26 Aug 2016 20:29
Location: Southern California

Re: how to detect disconnection from NFC

Post by Scotty » 16 Feb 2017 16:36

nantzen wrote:well, I know there is a trigger to detect if you are connected to a NFC tag (with a certain ID number) and I use this trigger to activate some action. But I didn't see a trigger that tell me that I am no more connected with the NFC tag (with a certain ID number) so that I can deactivate the previous action. Can someone help me?
I think it's theoretically possible, in Android, to detect the absence of (or loss of proximity to) an NFC tag but, to the best of my knowledge, you can't do this in Automagic. As you said, AM can detect (and respond to) proximity to a tag, but I don't think there is an easy way to (for example) poll every so often to see if you are still close to it.

If I'm incorrect, I am sure someone more knowledgeable than I will post a more helpful response.

User avatar
Martin
Posts: 4468
Joined: 09 Nov 2012 14:23

Re: how to detect disconnection from NFC

Post by Martin » 16 Feb 2017 16:41

Hi,

Unfortunately regular Android ROMs don't send an event when a tag is lost/removed. Please also check this post for an Xposed module:
http://automagic4android.com/forum/view ... 701&p=5118

This post could also be interesting:
http://automagic4android.com/forum/view ... 902&p=2545

Regards,
Martin

Post Reply