NFC tags don't work in sleep or lock state, then repeatedly if attached to dock. Non-Root Fix?

lesorkim

Well-known member
Aug 13, 2012
72
0
0
Ok, I've got my SGS3, and I got my NFC tags, and NFC Task Launcher app. Then I am reading about those people who put an NFC tag in their car dock to launch all the stuff they want to happen in the car; GPS, music, wifi off, bluetooth on, etc. The problem is that when you are exiting the car you need to toggle all that stuff to "in my pocket again" mode. Right away, you'd think you'd make a "Switch" tag that would do list "A" on the first swipe, and list "B" on the second swipe - Right? Here's the problem with that; eventually, your phone will go to black screen, then you'll have to wake it up, then unlock the screen - at that moment the NFC tag is read again. So basically, every time you unlock the screen the tag is read again.

I have a similar situation on my desk at work where I have a dock. (That's where I discovered this issue) So now I moved my tag down to the surface of the desk closest to where I walk up to it. Then I swipe and put in dock. When leaving the desk I swipe it again before pocketing it.

Here's my questions;
1. What happens when I walk off from my desk and forget to put it in pocket mode? I don't see a place in NFC task launcher to manually launch the list of actions from the program instead of an actual tag. Ideas?

2. It won't let me start GPS without the phone being rooted. I don't want to root my phone. Will some other program (say; Tasker) launch GPS service? (I normally turn off GPS to save battery.)

3. Finally, when you are switching I wish it would momentarily flash the list is was doing so I would know which side of the switch it activated. I know there is a notification that is loaded, but that requires a few extra steps to look at. Any creative solutions? EDIT: IT DOES FLASH IN THE NOTIFICATION BAR WHAT TAG HAS JUST BEEN PROCESSED.
 
Last edited:
If you root, you can do the gps and have it read tags while on lockscreen or even with the screen off. Rooting is a very simple process on this phone and doesn't change anything else on the phone.
 
I use nfc task launcher as well but I simply use it as a trigger for my tasker tasks. Tasker has almost unlimited functionality. I would suggest getting it and using NFC task launcher to trigger a task.

I, for example, have a tag on my pro-clip in my car. When it reads the tag I have it change a variable in tasker (CarMode) to On. The next part of the task is a Wait for 1 minute action then change CarMode to off. Now, the way that I actually have my actual car mode task fire is when the variable CarMode is on and I plug my phone into the car charger. My CarMode task will fire if power mode is any and the variable %CarMode = On. If I plug in my phone anytime within that first minute of it reading the NFC tag it will switch to my car mode and perform the actions I want. When I unplug my phone to take it out of my vehicle it fires my exit task to reverse anything I want to set it to my normal mode.

If you are unfamiliar with tasker there are a couple of tutorials on how to use it around the internet. I suggest reading up on it and getting familiar with it because in my opinion, Tasker is the most useful app in the smartphone world.
 
Ok, I've got my SGS3, and I got my NFC tags, and NFC Task Launcher app. Then I am reading about those people who put an NFC tag in their car dock to launch all the stuff they want to happen in the car; GPS, music, wifi off, bluetooth on, etc. The problem is that when you are exiting the car you need to toggle all that stuff to "in my pocket again" mode. Right away, you'd think you'd make a "Switch" tag that would do list "A" on the first swipe, and list "B" on the second swipe - Right? Here's the problem with that; eventually, your phone will go to black screen, then you'll have to wake it up, then unlock the screen - at that moment the NFC tag is read again. So basically, every time you unlock the screen the tag is read again.

You could try enabling rate limiting to prevent the tag from being executed again within a set time period.

I have a similar situation on my desk at work where I have a dock. (That's where I discovered this issue) So now I moved my tag down to the surface of the desk closest to where I walk up to it. Then I swipe and put in dock. When leaving the desk I swipe it again before pocketing it.

Here's my questions;
1. What happens when I walk off from my desk and forget to put it in pocket mode? I don't see a place in NFC task launcher to manually launch the list of actions from the program instead of an actual tag. Ideas?

Long press the saved tag, hit run

2. It won't let me start GPS without the phone being rooted. I don't want to root my phone. Will some other program (say; Tasker) launch GPS service? (I normally turn off GPS to save battery.)

No. GPS access is restricted to apps signed with the platform key or apps residing on system. The exploit that apps like Tasker used in Gingerbread was fixed as of 2.3.4 (maybe 2.3.3). Essentially they would send an intent to the Power Manager widget pretending to be a button press. As this is a huge security hole (you could get at any secure settings) Google fixed this.

3. Finally, when you are switching I wish it would momentarily flash the list is was doing so I would know which side of the switch it activated. I know there is a notification that is loaded, but that requires a few extra steps to look at. Any creative solutions? EDIT: IT DOES FLASH IN THE NOTIFICATION BAR WHAT TAG HAS JUST BEEN PROCESSED.

It flashes in the notification bar. Alternatively you can go into settings and enable toast notifications (visual notifications in the list).
 
krohnjw- have you ever considered adding some sort of monitoring feature in NFC task launcher to fire the NFC reader to check to see if a tag is still around at set intervals? I think it would be useful in a situation like this. It would be great if when it first read the tag it started a monitor that fired every like 5 min to see if the tag was still there or not. If it is, task remains active, if it isnt anymore, task is disabled. I'm no dev so I have no idea if that is possible but just an idea. Love the app by the way :)
 
don't waste your money on tasker

Use llama profiles, it basically does everything and its free.

As for your nfc questions... well I don't have NFC tags all i can't help you. lol
 
First of NFC + sleep/lock :
There is an updated nfc apk on xda-developers that will allow you to use NFC while the screen is locked or off (you can choose)
I suspect you need a rooted phone though

second the GPS can ONLY be switched if you are rooted, this was implemented in Android 2.x I believe
without root it is only possible to show the settings screen where you can enable the GPS.
Again rooting and the use of "secure settings" (a tasker plugin) will fix that for you.
llama is indeed free and it will probably work for most profiles, but if you want flexibility get Tasker

Root also has some other benefits, Cerberus for instance, why are you hesitant to rooting?
 
krohnjw- have you ever considered adding some sort of monitoring feature in NFC task launcher to fire the NFC reader to check to see if a tag is still around at set intervals? I think it would be useful in a situation like this. It would be great if when it first read the tag it started a monitor that fired every like 5 min to see if the tag was still there or not. If it is, task remains active, if it isnt anymore, task is disabled. I'm no dev so I have no idea if that is possible but just an idea. Love the app by the way :)

Yeah. There's not a "good" way to do it right now in Android though as the NFC service disables when the screen is off and doesn't enable again until it's unlocked. So you end up with all of these "fail" conditions when the service is off and are left monitoring screen/power state/last known tag state to try to compensate. At best you get a method that is kind of hacky and will not work as intended in all circumstances.
 
KROHNJW: I overlooked the long-press then play option. Yes, that's exactly what I was looking for.
 
First of NFC + sleep/lock :

Root also has some other benefits, Cerberus for instance, why are you hesitant to rooting?

Regarding Rooting: It may help to know that while I have had a cellular phone for nearly 20 years (man I had a beeper in 1980 when no one had them :) ) in any case, this SGS3 is my first smart phone. So, I am hesitant to mod the phone - just yet. Always best to be grounded in the basics before trying alternatives I think. I bough three S3's, getting the wife and son one as well. (Soon enough he'll have his rooted and glammed up) He's had a droid for the past 3 years, so the basic android op sys is old stuff to him, and who better to tinker around with it.

BTW; Love NFC Task Launcher, super basic and just works as expected. I will probably purchase Tasker in the next week. The boy has it and has been showing me some of the stuff he has it setup to do. Together I suspect they will be the Dianamic Dou!
 
First of NFC + sleep/lock :
There is an updated nfc apk on xda-developers that will allow you to use NFC while the screen is locked or off (you can choose)

I wanted to enable NFC when screen is locked/off too - after all, if I'm going to have to power on, and enter passcode/pattern to unlock, I might as well use the one click widgets to change my settings. But I couldn't get around the thought of somebody creating a NFC tag just to play a prank and toggling all my settings and/or sending SMS out from my phone. I usually have my phone with me most of the time, but not all the time.
 
Why not just go into your developer settings and configure your phone to not sleep when docked or plugged in? Then it won't sleep in the first place. This is what I do, and if I decide I want the screen off, I just turn it off. Most of the time, I don't want it to go off when it's plugged in, so this works well.

As far as manually launching the task in question, several posters here have suggested Tasker, while others say don't waste your money. Tasker was the first app I paid for, and as far as I'm concerned, that's the one app I won't do without. It's been worth every penny ten times over. These days, you can define your task in Tasker and export it as an app. Put that on your home screen, on the dock, in a folder, whatever. Then just tap it when you want to set a specific config. The same task you exported can be tied to a Tasker profile that you trigger with the NFC tags. You can even put that app on another device without Tasker, if I'm not mistaken. I have one that toggles my tether app, but I haven't bothered with other actions yet. The only thing I can't get Tasker to do that I'd like is to connect to a specific VPN server.

GPS doesn't bother me that much because I keep the Power widget on my home screen. If you eventually decide to root (I'm waiting until the VZW JB update for my SGNexus), you can install secure setting from the market, which will provide a plugin for Tasker that does the trick. Until then, the power widget is the way to go.

If battery life is not a problem (i.e. you have a battery the size of a Smart Car), you can create tasks that watch your location to know when to turn on WiFi, tasks that automatically turn off GPS (turning it off doesn't require root IIRC) and if you eventually root, when to turn GPS back on to watch your location. My phone will burn right through a fully charged battery in about an hour when I turn this on, so I don't bother. Eventually I'll grab a few tags myself and start integrating them into my context switching.

HTH.

EDIT: By the way, everything I've read about the Android phones suggest that the GPS doesn't draw power until an app actively requests a location. I only keep it off because I haven't disabled all the apps that like to snoop on my location (Facebook, I'm looking at you :mad:). Still, I don't believe that's a big drain to grab one location. Also, I rooted my daughter's phone (the wife's old DInc), and I created a Tasker profile that will turn on the GPS and get her location, then SMS her coordinates back to me and my wife when either of us sends a specific text. This way, when she doesn't her her phone chime a text message, I can still keep an eye on her without really bothering her. If I or my wife call her, Tasker boosts the volume (only for myself and my wife) so if we need to get hold of her, she's sure to hear it. Hey, she's 13. It's a way to give her a little autonomy without us standing at the door worrying.

Second Edit: - I have a Galaxy Nexus, not a SGS.
 
Why not just go into your developer settings and configure your phone to not sleep when docked or plugged in?

I went to Settings/Developer and did not see this option. Can you be more specific? Thank YOu

EDIT: Nevermind, downloaded "Stay Awake"
 
Last edited:
If battery life is not a problem (i.e. you have a battery the size of a Smart Car), you can create tasks that watch your location to know when to turn on WiFi, tasks that automatically turn off GPS (turning it off doesn't require root IIRC) and if you eventually root, when to turn GPS back on to watch your location. My phone will burn right through a fully charged battery in about an hour when I turn this on, so I don't bother.

I actually have similar profiles set up and the battery life didn't seem to be impacted at all by that. I suspect you might be using GPS to watch your location - I use 'cell near' instead. It isn't as accurate as GPS of course, but it is close enough to detect when I'm a block or so away from home/office etc and kicks off the relevant task/profile.
If you are not using the "Cell near", try that out - hopefully that will resolve the battery issue.

If you need more accurate results, you can try multiple contexts - "Cell Near" and "GPS" - tasker will not start the GPS till the "cell near" is active (read the end of the article at http://tasker.dinglisch.net/userguide/en/loctears.html )
 
don't waste your money on tasker

Use llama profiles, it basically does everything and its free.

As for your nfc questions... well I don't have NFC tags all i can't help you. lol

I don't really think you know how to use Tasker if that's what you think about it... I would suggest reading some tutorials. No other app can compare...

Sent from my Galaxy Nexus
 
I don't really think you know how to use Tasker if that's what you think about it... I would suggest reading some tutorials. No other app can compare...

Sent from my Galaxy Nexus

You shouldn't have to read tutorials to use an app. Apps are supposed to be quick, convenient, and easy. The user interface is terrible and looks like it was designed for the first android phone. It's terrible and ugly. Not intuitive.

Plus other apps do compare and for his purposes of turning GPS on be definitely doesn't need tasker a $7 app. Llama profiles does many of the things that tasker does. You obviously don't know that because you've obviously haven't used both like I HAVE. To say no other app can compare is an ignorant blindly stated argument.

Another thing. I said nothing about tasker in the first place. Please tell me what I "thought about tasker that I need to read tutorials for". Dick head. Do not insult my intelligence.

If you meant no harm in your response then I'm sorry as I took it offensive. If you did... screw off :p
 
So, what you are saying is that NFC tags don't work if the phone is locked. That sounds really weird to me. Why not?

The reason I ask is that sometimes my phone doesn't connect to BT in the car. If I turn BT off and on again on the phone, it works. So I have an NFC tag in the car. As I get in, I want to move my phone over it and expect it to turn BT off and on again (I've set it up in NFC task launcher). Are you saying this won't work?

Alan
 
So, what you are saying is that NFC tags don't work if the phone is locked. That sounds really weird to me. Why not?

The reason I ask is that sometimes my phone doesn't connect to BT in the car. If I turn BT off and on again on the phone, it works. So I have an NFC tag in the car. As I get in, I want to move my phone over it and expect it to turn BT off and on again (I've set it up in NFC task launcher). Are you saying this won't work?

Alan

I'd assume for security purposes dude. I wouldn't want my device to react to any wayward NFC tag it grazes. There's a flashable mod that enables it, so it's not impossible to have.

Just buy Tasker from the Play Store, schedule your switches by time, and call it a day.

Sent from my SCH-I535 using Android Central Forums
 
I went to Settings/Developer and did not see this option. Can you be more specific? Thank YOu

EDIT: Nevermind, downloaded "Stay Awake"

Hmm, on my GNex, it's right there - Settings->Developer->Stay awake.

On my DInc, I think it was under Settings->Apps->Developer options->Stay awake

There should be something to keep it awake when it's charging. Of course, Stay Awake should work too, but seems redundant if it's built in.
 
Do you have the recipe for this? I've been poking around wioth Tasker and keep running into problems.

Thanks!
 

Latest posts

Trending Posts

Members online

Forum statistics

Threads
953,985
Messages
6,960,188
Members
3,162,894
Latest member
guyuynhfrd