Twinsprite Android SDK Demo
Java
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.idea
TwinspriteSDK
app
gradle/wrapper
.gitignore
LICENSE
README.md
TwinSpriteAPITest.iml
build.gradle
gradlew
gradlew.bat
settings.gradle

README.md

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

Setup

  1. If you don't have a Twinsprite Development Portal account, follow the Quick Start Guide to create an account, a game and some development Toyx.

  2. 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.

  3. 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.

image

NFC

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.

Code Overview

  • 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.

Resources

Twinsprite Android SDK Documentation Site

Twinsprite Android SDK Reference

Twinsprite Android SDK Module

Support: dev@twinsprite.com