Twinsprite Android SDK Demo
This repository includes an Android Studio project with a demo APP that illustrates the main Twinsprite SDK methods. The Twinsprite Android SDK module is included inside the TwinspriteSDK folder.
The project also illustrates how to use the NFC reader of a Android phone to read a ToyxID and how to extract it from a QR code using the ZXing Barcode Scanner
Open the Android Studio project and replace the API_KEY and SECRET_KEY strings at the top of MainActivity.java with your game key-pair.
Build the application and run it on an Android Phone or the Android emulator. Download and install the ZXing Barcode Scanner App, requied to scan QR codes, scan a valid toyxID QR code from the Twinsprite Development Portal and start making requests.
If you have a Android device with NFC capabilities, store the ToyxID on a NFC tag using NDEF format. You can use the NXP TagWriter App. It provides a function to write NFC tags directly from QR codes, so you can scan the ToyxID QR included on the portal.
MainActivity.java provides code examples of how to create a session, retrieve and update the Toyx data, and illustrates how to comunicate with the ZXing QR scanner.
NfcActivity.java illustrates how to init the Android NFC adapter and extract the NDEF formated tag with the toyxID.