Re: Continual NFC Polling

1,498 views
Skip to first unread message

Pent

unread,
Sep 5, 2012, 6:25:45 AM9/5/12
to Tasker
What mechanism does NFC task launcher use ? You select an action from
the state plugin category in Tasker, or it NFC Task Launcher shows you
a list of tasks to associate a tag too ?

Pent

baudi

unread,
Sep 5, 2012, 11:24:32 AM9/5/12
to tas...@googlegroups.com
Why not use the NFC plugin instead? You can use it to trigger a profile, the use the enter and exit tasks to do what you want.

On Wednesday, September 5, 2012 4:44:16 AM UTC-4, Steve McCall wrote:
Hi,

I was wondering if it is possible using tasker in conjunction with NFC Task Manager to keep checking if an NFC tag is present (say every 5 minutes) to maintain a certain set of conditions (e.g. bluetooth on, car mode on etc)

Not sure it is possible but was wondering...

Basically, I've got an SGS3 and want to toggle bluetooth and car mode depending if my phone is in it's car holder (not a dock).  I've got NFC tags and experimented with NFC Task Launcher to activate bluetooth when it scans but it doesn't deactivate.

Does anyone have any ideas?

Thanks,

Steve

Steve McCall

unread,
Sep 6, 2012, 3:15:39 AM9/6/12
to tas...@googlegroups.com
Ok, Ill look into that, thanks!

Steve McCall

unread,
Sep 6, 2012, 3:28:23 AM9/6/12
to tas...@googlegroups.com
Ok,

I've managed to get tasker to recognise when it scans a tag.  How can I get it to recognise when it is taken away from the tag?

Thanks,

Steve

baudi

unread,
Sep 6, 2012, 11:19:39 AM9/6/12
to tas...@googlegroups.com
Did you use it as a profile trigger?

Steve McCall

unread,
Sep 6, 2012, 1:58:32 PM9/6/12
to tas...@googlegroups.com
Yes, I've used the state > plugin > NFC and then scanned the NFC tag.

I've now set bluetooth to toggle as an exit task.  That works but it isn't really what I want.

I was hoping that I'd be able to switch the bluetooth on when in range of the tag and switch it off when out of range of the tag.

keith twombley

unread,
Sep 6, 2012, 2:20:46 PM9/6/12
to tas...@googlegroups.com


On Sep 6, 2012 12:58 PM, "Steve McCall" <steve....@gmail.com> wrote:
>
> Yes, I've used the state > plugin > NFC and then scanned the NFC tag.
>
> I've now set bluetooth to toggle as an exit task.  That works but it isn't really what I want.

What does it do?

baudi

unread,
Sep 6, 2012, 3:34:04 PM9/6/12
to tas...@googlegroups.com
The range of the NFC tag is about 1/2 inch, so I'm not sure you'll be able to accomplish what you want with NFC.

Scott Miller

unread,
Oct 5, 2012, 9:31:04 AM10/5/12
to tas...@googlegroups.com
Using the Locale/Tasker NFC Plugin I get the following (with repetitive scan off):
Upon placing next to tag - the settings activate
Upon removing tag - NAAAAHHHHTHING! the exit task never triggers.
Upon replacing the tag - Nothing ... because I have repetitive scan off

Yeah, that't the way this plugin works. I've communicated with the developer about it, and thought there might be some changes made, but I haven't seen anything. 

One solution is to have a second tag to clear the state of the first tag. Without repetitive scan on, it will not change the state until it scans another tag.

Basically, leave repetitive scan turned on. Use it in a separate profile to set a variable. Then use this variable as the state in your regular profile. In my case, I use this for a car dock. I combine it with a power state, so that when either one goes away the profile exits and I clear the variable. With repetitive scan turned on it will not try to remember its state.

Scott



Philip Clemow

unread,
Oct 5, 2012, 11:18:41 AM10/5/12
to tas...@googlegroups.com
Ill have to think about this ... seems like a timeout would be nice. However you have given me an idea.

Scan (with repetitive) nfc to set a profile which sets a variable %Dock_Triggered to 1 if %Dock_Triggered isnt already 1. Exit task is nothing.

Watch %Dock_Triggered (can tasker do this?) and if that changes to 1 then do dock tasks

When unplugged (dock provides power) then if %Dock_Triggered = 1 then do undock tasks and set %Dock_Triggered to 0

By this time the nfc should be out of range and it wont re-trigger.

Im going to give this one a go but ... a timer would be better.

Philip Clemow

unread,
Oct 5, 2012, 11:22:12 AM10/5/12
to tas...@googlegroups.com
I just re-read your post more clearly and that is exactly what you suggested.

Ill get on to writing it up in tasker

Cheers

Phil

hollywoodfrodo

unread,
Nov 6, 2012, 3:38:55 PM11/6/12
to tas...@googlegroups.com
hey gang,

So the way NFC works when your phone comes into contact with a tag the tag is "triggered" and sends a one time signal to your phone.  if the phone stays in contact with the tag, it will not be triggered again and removing it from the tag won't do anything either because the way NFC works.  (Your phone battery's magnetic field gives the tag power and it sends a one time pulse.)  However, if you remove your phone from the tag (don't have to go far) and then re-tap it, it will trigger again.  

So for in car toggle there are several options....

I use the Tasker URL Launcher plug-in which will allow you to launch any task via a URL.
I use NFC Smart Q for detecting tags.  It has a switch/toggle feature.

So you can create a switch tag w/NFC Smart Q and use a URL to launch your in car tasker task.  When you leave the car, you can pull your phone away from the tag  then quickly tap it back to it - this will launch the 2nd switch URL to launch your leaving car tasker task.

I've spoken to the developers of NFC Smart Q about adding in the ability to launch Google Shorcuts natively which would then also easily allow the lauching of Tasker Tasks via Shortcuts, but for now the URL thing works great.

Oh, and if you need some cool Android NFC Stickers/Tags, check out andytags.com.

Andrea Borgia

unread,
Dec 9, 2013, 1:03:49 PM12/9/13
to tas...@googlegroups.com
I am using a task along the lines of Juan's suggestion, however I am bumping into a race condition: when the "exit car" task is running (which also clears the "incar" variable) the tag might get rescanned. In my setup this means wifi won't be activated even if I am near home (because in car mode it's not supposed to) or perhaps the previous volume values (raised to the max during "enter car") will be lost.

I am using "Trigger" (formerly NFC Task Launcher) to start a task in Tasker and it seems there is no way to detect loss of NFC tag.
How do I disable NFC scanning from within Tasker once the car tag has been detected?

Andrea Borgia

unread,
Dec 9, 2013, 1:29:24 PM12/9/13
to tas...@googlegroups.com
Never mind my last question: I found out that NFC is an option within Secure Settings and that it was not enabled.

Pete Myers

unread,
Jan 28, 2014, 2:22:51 PM1/28/14
to tas...@googlegroups.com
Juan,

Thanks. This was exactly the logic I was looking for. Thanks for sharing. I've got it to fire if %InCar is Yes and Headphone state is plugged in but the logic works the same way.  I appreciate it!

On Monday, November 5, 2012 11:11:01 PM UTC-6, Juan Portela wrote:
Phil, 

I do something similar.

NFC tag flips variable of %INCAR to yes
I have another profile with two contexts:  %INCAR is yes and Power is Plugged in.
The profile is active once the tag changes the variable AND the power is on.  It then fires my "car tasks"
The moment I unplug; the profile goes inactive and it fires my exit tasks...which include changing the %INCAR to no.



Reply all
Reply to author
Forward
0 new messages