[Samsung Galaxy Nexus] bcrawford:
New to tagging

Finally got some tags and started playing with them. I made my own deskdock a few months ago out of wood and using the pogo pins on the side to charge it. It worked out great, but I still couldn't find a good way to get into a dock mode that I liked. I used tasker, locale NFC plugin, and ultimate rotation control to get things just how I want them.

So I wanted to use a nfc tag to trigger a desk dock mode on my phone. When you use the pogo pins to charge, it takes about 10 seconds to register as charging(some kind of safety measure) before the screen will come on.

Problem 1: When the phone would register as charging, it will only open the lockscreen and the NFC tag is not read until the phone is unlocked. I wanted to be able to set the phone in the dock and not worry about it. Enter the charging profile.

Charging Profile:

Context:

state>power>power> any power

Enter Task: Lockscreen disable

-display>keyguard> off

-alert>popup> text=charging, duration=1sec

Exit Task: Lockscreen enable

-display>keyguard>on

Problem 2: For some reason, this method worked for disabling the lockscreen and taking me straight to the homescreen when I put it on the charger, but it would not detect the NFC tag until I would physically touch the screen. I don't know why, but using the text popup triggers it to read the NFC tag.

This profile works for me because I like the lockscreen when I'm out and about, but I don't need it when my phone is charging.

So now I can slide the phone into the dock and after 10 secs or so, the screen comes on, unlocks, and reads the NFC tag I have on the dock. I made these profiles around the fact that I put the phone into the dock with the screen off.

Desk Dock Profile:

Context:

state>plugin>locale nfc plugin> My NFC Tag <--This allows using a nfc tag without writing to the tag

state>power>power> any power

Enter Task: DeskMode

-plugin>rotate> forced auto <--This allows landscape view on stock launchers

-net>wifi> on

Exit Task: NormalRotation

-plugin>rotate> auto <--Reverts back to auto orientation for everything but the launcher

Using the power as a second context will end the desk mode when the phone is removed from the dock.

The issues I'm still working on are these:

1. When the screen times out and I turn it back on, the NFC tag is read again. It doesn't mess with the profile any, but the sound gets kind of annoying after a while. I don't want to leave the screen on all the time.

Is there any way to disable the NFC automagically? I know widgetsoid has tasker integration, but using the NFC off switch only takes you to the NFC settings menu.

2. Using the locale NFC plugin lets you associate an ID number from a tag with a state context. My problem is that the tag is stored after it is read and that particular context is true until another tag is read.

Is there any way to clear the last NFC tag read or a way to reset the context?

I've been a longtime lurker on XDA and I figured I'd try to contribute where I can. I still need a few posts before I can use the search features so if anyone could help me out with the questions that would be great. I'm working on a car dock mode as well, but have no power to use as a context for that one, so answering these questions would be very helpful. Thanks