Giter VIP home page Giter VIP logo

snowshoe-android's Introduction

DEPRECATED. Please use snowshoe-android-v2 instead.

Android wrapper for SnowShoe

Note: there is another fine repo here that will prove helpful for anyone who needs their server to act as intermediary between device and SnowShoe servers. This repo does not yet support that use case.

This repo contains an example project using the SnowShoe Stamp. Download the example project (built for Android Studio, also compatible with Eclipse) to see how easy it is to drop in SnowShoe functionality. OAuth 1.0a and all that is built-in.

Import The Project into Android Studio

  • In general it's recommended to use Android Studio. For tips on how to import projects, there are many resources floating around including this one from Google.

  • Make sure to insert your appKey and appSecret that you get from the SnowShoe site when you register a new application (which is totally free). In the SnowShoeActivity.java file, look for the spots labelled: YOUR_APP_KEY and YOUR_APP_SECRET.

  • If you don't put in a valid key/secret pair, the SnowShoe servers will disapprove of you. Stay on their good side and feed them a key and secret!

  • Run your project on a touchscreen device (make sure it can accept 5 touches!), and set a logcat filter for messages of level Info with tag "result".

  • Stamp your phone with your developer's stamp (need one? they're totally free) and you can hopefully see a result like this pop into logcat:

{"stamp": {"serial": "DEV-STAMP"}, "receipt": "EdKr/rBblHx8ce+9QPZXlyVYvl4=", "secure": false, "created": "2013-06-19 01:08:38.366249"}

  • If you use a production (aka not the free developer) stamp that hasn't been tied to your appKey, or press your fingers against the phone, or whatever, you'll get a message like the following:

{"receipt": "iTpXGev3ya2k4UMgO7bc+9o/+mU=", "created": "2013-06-19 01:12:23.481493", "secure": false, "error": {"message": "Stamp not found", "code": 32}}

  • So make sure you parse out that JSON String stored in this.result. You'll want to write that parser in onStampResult(). It's up to you to react to the results of the query however you like, for example by matching the serial returned with a list of ones you're expecting to see.

  • Feel free to either take out the code from these classes, or simply reference this project as a library project and extend "SnowShoeActivity" in your own app!

Questions?

For hardware or API questions/feedback, address those to SnowShoe directly. For questions/feedback on this library, email me at [email protected], visit my blog, or follow me on Twitter

snowshoe-android's People

Contributors

mluedke2 avatar

Stargazers

 avatar

Watchers

James Cloos avatar  avatar  avatar  avatar

Forkers

dboyi

snowshoe-android's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.