V Hack Android Wiki
Advertisement
A logo

Catch V If You Can[]

During the hackathon we created the CatchVifYouCan app for
Android. CatchVifYouCan aims to bring health and (European) Culture into
the minds of its users. CatchVifYouCan mixes Scotland Yard, Pac-Man and the gameof Tag in an hightech innovative gameplay, combining the capabillities of a modern Android device with the culture of European cities. CatchVifYouCan transforms cities into urban playground offering a unique oppertunity to see a city in a new light and meeting interesting new people along the way.

Team Nitro

Our team is spontanously formed from a group of lone gunners,i.e. participants without a pre-formed team. The members are

About the hack[]

The hack communicates with a server. The server is developed with Grails and exposes a REST-interface. For more information about the REST-interface see the API section.

What APIs, tools or kit did you use?[]

The Google API is used to provide the map functionality.

The Android app is developed with the Eclipse IDE.

The backend is developed with IntelliJ Premium edition.

Works on Android versions: 10 - 16[]

During development we focused on a narrow set of releases because we had access to a limited set of devices. Nothing prevents the application to be adopted to a wider set, but some time should be invested.

Android SDK APIs[]

4.1

Third party APIs[]

No third party API is used.

API
[]

The following list the REST-interface for the "Catch V If You Can" back-end.

    Protocol | url                                                                 | result
    ---------+---------------------------------------------------------------------+-------------------------------------------------------------------------------
    GET      | /api/game                                                           | returns a list of game ids
    POST     | /api/game                                                           | creates a new game
    GET      | /api/game/$gameId                                                   | returns a list of player ids in game $id
    GET      | /api/game/$gameId/$playerId                                         | returns the trail of player $playerId in $gameId
    PUT      | /api/game/$gameId/$playerId                                         | registers player $playerId to game $gameId
    POST     | /api/game/$gameId/$playerId?latitude=$latitude&longitude=$longitude | adds a location at $latitude, $longiture for player $playerId in game $gameId
    GET      | /api/game/$gameId/$playerId/$n                                      | retrieve $n-th location in the trail of player $player in game $game


The run below demonstrates how the create a game, add some players to the game and update the trail of the players with [cUrl][13]. All the urls should be prepended with a correct server and endpoint, e.g. http://localhost:8080/server/

    curl -X POST -d "format=json" /api/game  // { "status":"ok" }
    curl -X GET /api/game?format=json        // { "game":[1] }
    curl -X PUT /api/game/1/anna?format=json // { "status":"ok" }
    curl -X PUT /api/game/1/bob?format=json  // { "status":"ok" }
    curl -X GET /api/game/1?format=json      // { "players":["anna","bob"] }
    curl -X POST /api/game/1/anna?longitude=0&latitude=0 // { "status":"ok" }

Media[]

License[]

Copyright (C) 2012 Iulia Stana, Hans van der Scheer, Lorenzo Marchiori,Daan van Berkel

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Source code and links[]

We used git as a version control system. The source can be found on dutchaug/catchvifyoucan on GitHub.

Advertisement