README.md

PressureNet SDK

The PressureNet SDK is an Android library project that enables simple atmosphere sensor data collection and transmission to researchers. This SDK was created by Cumulonimbus for use in PressureNet and third-party Android apps. The code is open source and released under the MIT license. If you're interested in using this SDK in your app and sending live atmospheric pressure data to scientists working on a better weather forecast, join our Developer Program to get an API key.

This SDK is intended for atmospheric sensor data collection. We have also built a PressureNet API for data dissemination that is actively used by scientists and researchers. We provide an explanation and documentation for the Live API. Of course, that project is open source too.

Installation

Include this SDK in your Android project:

In Eclipse, open the Project Properties of your existing application.

Open the Java Build Path page, then the Source tab.

Use the Link Source feature to include the 'src' directory of this library. Rename the new folder to something like 'srk-cbsdk'.

Usage

There are two usage paradigms:

Start the SDK Service and let it manage periodic data collection.

Periodically send an Intent to the SDK to collect and send a single measurement at a time.

If your app already periodically runs in the background, it might make sense to pick option 2 rather than have two background services running. Otherwise, choose option 1 and let PressureNet do all the work. Simple steps to get started with the SDK are presented here. Full documentation is in the docs/ folder. We also provide a full Example project that uses the SDK and simplified code to help you get started.

Option 1: Start the service and let it run

All interaction with the PressureNet SDK will be done through the CbService class. Start the service by creating an Intent and calling startService:

And that's it! By adding those elements to your manifest and calling startService, the PressureNet SDK will run in the background and send data. For more control, your app can communicate with the SDK.

And that's it! The PressureNet SDK will collect and send (or bufffer) a single atmospheric pressure measurement.

Communication

Communication between your app and the CbService is done by binding to the Service and passing Messages. For full documentation, please see Documentation.md and the docs/ folder, which contain descriptions of available communication messages as well as Javadoc comments.

About

This SDK is developed by Cumulonimbus as part of the PressureNet project. Our primary goal is to improve weather forecasting by dramatically increasing the data inputs available to weather models. We built this SDK so you can help this effort by contributing data! Please email us with any questions: software@cumulonimbus.ca