I'm struggling in finding a working solution and I need aid.
I am working on a small IoT project where I want to abuse NFC tags. I've succeeded in reading/writing in the open app but I wish to read while the app is closed.
More or less I just want to send a small UDP message when reading the appropriate NFC tag, which turns out is a bit more difficult doing in a background task.
The main headache is that I can't find a task trigger that runs upon NFC chatter. I've tried SmartCardsTrigger and ProximitySensorTrigger from the following sources: https://msdn.microsoft.com/en-us/windows/uwp/devices-sensors/host-card-emulation https://github.com/Microsoft/Windows-universal-samples/tree/master/Samples/ProximitySensor
The ProximitySensorTrigger seems like it's almost triggering at random, and kinda triggers less when I push the NFC tag against the phone. Maybe I'm doing something wrong.
The SmartCardsTrigger doesn't trigger at all. I guess the EmulatorNearFieldEntry trigger type is what I want but for some reason it's unsupported (?).
Anyhow, I am using a Lumia 920 running windows 10 mobile. To my knowledge it does not support smartcards but I just hoped it could use the same trigger for NFC tags.
Reading the responses on a similar question, Akash Chowdary suggested that it may be possible writing a custom trigger. If you know any tips that may point me in the right direction then please do tell them. I got the competence in researching but it's a big sea, and it would really help knowing where to start ^^.
I'm quite the noob when it comes to background tasks, and I am very confused of why after registering a SmartCardTrigger task I have no tasks running.
If I do for example a TimezoneChange trigger or a ProximitySensor trigger, the task is shown as it should. Maybe because my Lumia doesn't support the SmartCardTrigger? Would've guessed it to thrown an error if that's the case but what do I know.
Tl;dr: I want to read NFC tags in a background task, how do I do that on a Lumia 920 inside a basic UWP project?