1
votes

Is it possible to check (periodically) if a nfc tag is near? I want to put an nfc tag inside a car holder and wenn i take the phone out of the car, the phone should stop sending GPS.

All i could find was this: How to find out whether an NFC tag is still in range of an Android now? But in my scenario the Display is off.

Is there a way to do this or is there a way to detect when there is no nfc tag?

1

1 Answers

3
votes

Unfortunately you can't when the display is off. Android's reader/writer mode is disabled when the screen is off.

Beside the default behaviour of Android's NFC, there is an application which make it possible to detect NFC tags when the screen is off (or even locked). I did not tested it myself, but if you want to achieve this you can give it a try. I guess your phone needs to be rooted to use this application.