If I understand correctly, this library generates invoices (ie addresses + amounts), and also has a means of checking if an invoice is paid/unpaid.
Yes.
I can see how the invoice properties could be used to create QR codes (or even use the method getQrWebpage if I don't want to generate the qr image myself), but I'm not 100% clear on the NFC side of things.
Can you tell me if I can use this library with NFC?
Near Field Communication (or NFC) is a core feature of the android environment. I'm not sure how familiar you are with android development, but the core 'method' that an android application uses to manage input is with an 'intent'. When you develop an android application, you develop 'intents' (what you want to do), and then start an 'activity' to act on that intent, or you can generally send an intent to the android OS, and let it call the appropriate "activity" that is suitable for the intent you're sending. When you click on a web link in an SMS, this is what is happening. The SMS program doesn't know what program to start (chrome, firefox, opera, etc.), it simply passes the web link to the OS and effectively says "start whichever program should be started given I'm handing over a web address". The OS then starts the program, and passes the address to it, and away you go.
The DC POS API does the same thing. It develops a generic bitcoin payment intent, and passes it to the OS. If there is a wallet program on the OS, it will start this program, and then seek payment. The querying of the payment is done by querying the block-chain, not the payment wallet, so regardless of whether this payment has occured on the device seeking payment, or the device sending payment (which may be different), the device seeking payment will know that payment has occurred.
What does this mean? By using an NFC push of the intent, instead of to the local device, the bitcoin wallet on another device will be initiated. This is achieved using the android beam library, and an example of it is here :
http://www.developer.com/ws/android/nfc-programming-in-android.htmlBy passing the code in the DC POS API to the NFC Message, you can use one android device to seek payment in bitcoin from another android device. The first android device then queries the block-chain to determine if the payment has been made.
Let me know if you want further clarification.