Giter Club home page Giter Club logo

checkin's Introduction

Check In

This is a simple app for android that sends current GPS coordinates and an API key as an HTTP post request to a specified server. That is all it does. Implementation of the server is up to you, but an example server written in Go can be found here.

Why?

In April 2014 I decided to attempt a thru-hike of the 2100 mile Appalachian Trail from Georgia to Maine. I thought it might be nice to keep track of my journey and have some data to play with later, but all the apps for keeping track of things like that required an internet connection while in use, consumed a lot of battery, or required the use of a proprietary service that wouldn't allow me to get all the data I wanted. So, two weeks before the trip, I wrote my own client and server (similar to the example server above).

API

Check In expects any server it communicates with to provide the following API. Your server MUST implement this API.

GET / (OPTIONAL)

Data is returned from the server as a GeoJSON feature collection.

POST / (REQUIRED)

Data is sent to the server in the form of a GeoJSON point feature or as a feature collection object if multiple points are being uploaded in a single HTTP POST, so your server should be able to handle both cases. There will often be extra metadata attached in the properties key of each geometry object, so your server MUST tolerate unknown fields.

Three fields are set in the POST request:

  • location — The actual location data as a GeoJSON object
  • type — The type of the GeoJSON object in location
  • api_key — An API key for authentication (if provided by the user)

While the GeoJSON type can always be retreived from the JSON itself after parsing, it is sometimes useful to have this information before you've actually parsed the JSON string. The type field will always be one of FeatureCollection, Feature, or Unknown if an error occurs (not likely).

Building

To build run:

./gradlew build

Make sure you have Google Play Services and Google Repository installed in the Android SDK manager. Also, API level 19 and the latest build tools.

checkin's People

Contributors

samwhited avatar

Watchers

 avatar  avatar

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.