I’m literally struggling to implement a NFC tag reading functionality in my native app.
As it is, it’s a very simple app with a list and some rest calls to interface with my server.
Now I would like to be able, as soon as my app is “on screen” to read the content of a compatible NFC TAG. It’s really frustrating.
Can you please help me?
The reference I’m following:
– sort of guide: guides/native-application/connectivity-and-wireless/nfc
– NFC manager API
– NFC tag API
First problem: in the “example code” in the guide, gmainloop is used but.. GMainLoop is not a valid identifier! So I had to comment out all the lines referring to that. Quite crazy.
Second problem: should I start listening for NFC events in my app_resume, while cleaning up everything NFC related in app_suspend?
Third problem: how do you print a meaningful error, if that error is an enum?
Reading NFC tag content
I’m literally struggling to implement a NFC tag reading functionality in my native app.
As it is, it’s a very simple app with a list and some rest calls to interface with my server.
Now I would like to be able, as soon as my app is “on screen” to read the content of a compatible NFC TAG. It’s really frustrating.
Can you please help me?
The reference I’m following:
First problem: in the “example code” in the guide, gmainloop is used but.. GMainLoop is not a valid identifier! So I had to comment out all the lines referring to that. Quite crazy.
Second problem: should I start listening for NFC events in my app_resume, while cleaning up everything NFC related in app_suspend?
Third problem: how do you print a meaningful error, if that error is an enum?
My actual code:
I get:
But the error is: I can’t even get to register the callback for nfc_manager_set_tag_discovered_cb:
(NFC) nfcInit nfc_manager_set_tag_discovered_cb error, -1073741822
(Please, let me know how to print “error” in some human readable format..).
This is *VERY FRUSTRATING*. I’m not that good with C, but I really think that Tizen doc should be able to help a little more..
Can you please help me?
BY
16 Apr 2025
Tizen Studio
BY
04 Nov 2024
Tizen Studio
BY
02 Apr 2024
Tizen Studio