Created
November 10, 2011 16:46
-
-
Save ilkka/1355358 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| .pro file: | |
| -------------- | |
| ... | |
| CONFIG += mobility | |
| MOBILITY += connectivity | |
| ... | |
| TARGET.UID3 = <from protected range> | |
| TARGET.CAPABILITY += LocalServices | |
| ... | |
| C++: | |
| -------------- | |
| MyNfcItem::MyNfcItem() : QDeclarativeItem(this) | |
| { | |
| QNearFieldManager *m = new QNearFieldManager(this); | |
| if (m->isAvailable() && m->startTargetDetection()) { | |
| // Never get here, because isAvailable() always returns false :/ | |
| } else { | |
| barf(); | |
| } | |
| } | |
| QML: | |
| ---------------- | |
| Blah { | |
| ... | |
| MyNfcItem { | |
| } | |
| ... | |
| } |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
NFC does work though because I get a system dialog for the tag.