NOT FOR ME! i need a moving ball to hit
even though i am no longer involved in this thread, i was
intrigued by your wish to run a background service for nfc, similar to
(and in conjunction with) gps background tracking.
i may not have all of this 100%, but i think i'm pretty close:
the main problem with an nfc background service is that nfc discovery
is triggered by an intent from the os's nfc software. such an intent is sent
to an activity. to reach your service, the app would have to turn around and
forward it to the service start. in theory, no biggie. but i think if a user forgets
to run your app before putting the phone to sleep, there could be a problem.
also if the app were killed at some point (the long-running service would never
be informed if a mashie or niblick were being used since such information has
to come from a running app via an intent).
technically, it is possible to discover tags without an intent, but not with
the nfc library. there is a method which takes a proactive stance to tag
discovery and uses a callback instead of an intent. i use it to stop the stupid
noise the device makes when a tag is discovered. (but do not disturb avoids
that.)