Trigger a process from reading of any NFC tag

Post your questions and help other users.

Moderator: Martin

Lange_666
Posts: 17
Joined: 19 Nov 2016 12:14

Re: Trigger a process from reading of any NFC tag

Post by Lange_666 » 23 Nov 2016 20:38

I have not the intention to run both Tasker and Automagic together.
For the time being however, i have them both running because i'm still porting over profiles from Tasker into Automagic flows.
What i mostly do after playing around with Automagic is to turn all the flows off and only run the Tasker profiles because they all work and the Automagic ones are still in development (but i'm getting there :mrgreen: ).

Now back to the NFC tag.

The NFC tag was written with NFC Tools which also includes a Tasker option to write a task (or more then one) into the tag.
When the tag is read, Tasker is tiggered (no profile since the tasks are not part of a profile but are stand alone) to run that task. This works great.

Now with Automagic, i can read this tag and it will return me the tags' ID.
If i put this ID into the flow's trigger, it will never trigger the flow when the NFC is read.

But i'f i rewrite the tag and write an ID to it with Automagic is works like a charm and the flow is "flowing" (doesn't matter is Automagic and Tasker are both running).
But then Tasker doesn't work anymore because since the task name isn't in the tag anymore (overwritten by the Automagic write), the corresponding task in Tasker is never started.

I can either use 2 different tags, one for Tasker and one for Automagic but that's a bit clumsy.
Now, if i could write the data that the original tag contains (Tasker task name) when i write it with Automagic, i think it might solve the problem.

Q: can i do such a thing with Automagic ? (at least i haven't found a way yet, tags written by NFC Tools don't trigger Automagic).

Q2: Does it need to have the automagic4android link into the tag for Automagic to be able to trigger a flow?

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

Re: Trigger a process from reading of any NFC tag

Post by Martin » 25 Nov 2016 19:46

I'm not sure what the NFC Tools write to the tag to execute a Tasker task. Maybe they write the information to trigger NFC tools itself which will then send an intent to Tasker to execute the task. I assume that you would have to enable a security option in Tasker to allow external apps to directly execute tasks if this is the case. Maybe they also write a Tasker AAR to the tag to execute Tasker. In both cases, there's no way for Automagic to get this intent instead of Tasker.

The feature to execute a flow on a generic tag only works when no other app with higher priority captures the tag so this usually works for things like contactless credit cards that are not handled by any other app on the device.
You could try to uninstall NFC Tools temporarily to see if the tag no longer triggers Tasker (or any other app). In this case, the option 'Existing Tag ID' in Automagic might start to work.

Regards,
Martin

Post Reply