# NFC actions while screen off or locked - it's now possible! UPDATE



## RMarkwald (Oct 19, 2011)

EDIT: Removed post containing link to Droid-Life article and NFC.apk files. They only would read existing NFC created tags, but would FC when trying to write new ones.

Please see DrMacinyasha's post below, as it contains a zip he compiled with this incorporated into the Settings menu for NFC. I flashed it (Foursquare works again yay!), and works great!

Sent from my Galaxy Nexus using RootzWiki


----------



## RMarkwald (Oct 19, 2011)

NFC Task Launcher won't write new tags FYI, but seems to read them okay. Maybe I'll try other NFC writing applications to see if those will create new tags.

Sent from my Galaxy Nexus using RootzWiki


----------



## tiny4579 (Oct 21, 2011)

That's scary. That means it could be even easier for people to hack.

I know you were hoping for positive responses but the dangers I've heard seem more feasible if you can read nfc with screen off. Sure it can have its ups.

I'm not trying to be a negative poster. I hope you don't take this the wrong way.

Sent from my Galaxy Nexus using Tapatalk 2


----------



## DrMacinyasha (Jun 6, 2011)

tiny4579 said:


> That's scary. That means it could be even easier for people to hack.
> 
> I know you were hoping for positive responses but the dangers I've heard seem more feasible if you can read nfc with screen off. Sure it can have its ups.
> 
> I'm not trying to be a negative poster. I hope you don't take this the wrong way.


Fortunately, you can set it to what you'd like. By default, it is set to *only scan when screen is on and unlocked*. You can have it scan when screen is on and locked (what I like to do with NFC Task Launcher to quickly silence my phone when I get in to work in the morning) or have it scan every few seconds while the screen's off.

Again, by default it only works while the screen's on and unlocked.

Now, with that out of the way, I happened to compile AOKP with this mod built-in yesterday. Note that Foursquare is also fixed in these:

Toro: goo.im/devs/drmacinyasha/toro/aokp_toro-build-39-20120619.zip
Maguro: goo.im/devs/drmacinyasha/maguro/aokp_maguro-build-39-20120619.zip

Commits included outside of committed source as of approximately 06:00am PDT 2012-06-19:
Add NFC polling mode setting
Add NFC toggle
Add DRM blobs (allows for Hulu to work)


----------



## RMarkwald (Oct 19, 2011)

tiny4579 said:


> That's scary. That means it could be even easier for people to hack.
> 
> I know you were hoping for positive responses but the dangers I've heard seem more feasible if you can read nfc with screen off. Sure it can have its ups.
> 
> ...


Tiny, not taken the wrong way at all. I completely understand what you are saying here, and presented a side I wasn't thinking of right way.

Sent from my Galaxy Nexus using RootzWiki


----------



## RMarkwald (Oct 19, 2011)

You complied and fixed Foursquare too?! Nice work sir!!

EDIT: Updated OP and Thread Title to reflect the new information in this thread.

Sent from my Galaxy Nexus using RootzWiki


----------



## DrMacinyasha (Jun 6, 2011)

RMarkwald said:


> You complied and fixed Foursquare too?! Nice work sir!!
> 
> Sent from my Galaxy Nexus using RootzWiki


Yup, the fix for Foursquare was found by some folks for CM, and it was merged into AOKP the next day. Rather than waiting for Build40, I decided to compile my own B39 with that in it.


----------



## RMarkwald (Oct 19, 2011)

DrMacinyasha said:


> Yup, the fix for Foursquare was found by some folks for CM, and it was merged into AOKP the next day. Rather than waiting for Build40, I decided to compile my own B39 with that in it.


Roman retweeted you asking about that, and I noticed some wonky stuff too...so I'm glad that it was found and fixed. Thanks again for re-compiling it! It's working great!


----------



## raygray123 (Jan 13, 2012)

does this mod add a toggle to aokp b39? and if so does the toggle turn nfc on/off to work while the screen is off or while the lockscreen is on? thanks!


----------



## RMarkwald (Oct 19, 2011)

raygray123 said:


> does this mod add a toggle to aokp b39? and if so does the toggle turn nfc on/off to work while the screen is off or while the lockscreen is on? thanks!


Yes, there is an NFC toggle, so you can toggle it off/on from the Notification Bar. With NFC turned on, you can select if you want it to work/scan a tag with screen on but phone locked or screen off/phone locked, or the normal way (screen on then unlock phone).


----------



## raygray123 (Jan 13, 2012)

RMarkwald said:


> Yes, there is an NFC toggle, so you can toggle it off/on from the Notification Bar. With NFC turned on, you can select if you want it to work/scan a tag with screen on but phone locked or screen off/phone locked, or the normal way (screen on then unlock phone).


thanks i hope they include this in b40! although i would just leave mine on all the time i dont see people walking by me and rapping my pocket to steal my $3 in google wallet!


----------



## RMarkwald (Oct 19, 2011)

raygray123 said:


> thanks i hope they include this in b40! although i would just leave mine on all the time i dont see people walking by me and rapping my pocket to steal my $3 in google wallet!


I wonder if NFC can be toggled on/off using Tasker...? So you could have it turn off when your phone screen is off, and on when you wake up your phone...or something like that...?


----------



## raygray123 (Jan 13, 2012)

RMarkwald said:


> I wonder if NFC can be toggled on/off using Tasker...? So you could have it turn off when your phone screen is off, and on when you wake up your phone...or something like that...?


Yeah that would be cool too! or too only work with the screen off when your in certain areas ie: home or work but not to work when the screen is off when your on the subway!


----------



## DHO (Nov 6, 2011)

DrMacinyasha said:


> Fortunately, you can set it to what you'd like. By default, it is set to *only scan when screen is on and unlocked*. You can have it scan when screen is on and locked (what I like to do with NFC Task Launcher to quickly silence my phone when I get in to work in the morning) or have it scan every few seconds while the screen's off.
> 
> Again, by default it only works while the screen's on and unlocked.
> 
> ...


Very slick work


----------

