Skip to content

Latest commit

 

History

History
64 lines (43 loc) · 2.68 KB

README.md

File metadata and controls

64 lines (43 loc) · 2.68 KB

Weather Station Sample App - Android

Sample application that implements the Netatmo API available here: https://dev.netatmo.com/dev/resources#/technical/introduction

This app uses the Android Volley library (which uses HttpUrlConnection or AndroidHttpClient). You can use any other library as long as it support SNI.

It contains two packages:

  • api: Classes to get you started with our API including a http client and some parsing utilies. This implementation provides tools to get the last measurements for a given device.
  • sample: A quick example of what you can do with the api package.

Explanation & Usage

  1. Register your Netatmo application: https://dev.netatmo.com/dev/createanapp.
  2. Extend the NetatmoHttpClient class, e.g. SampleHttpClient.
  3. Using the previously created class, authenticate your user, e.g. LoginActivity.
  4. When authentication tokens are stored, call getDevicesList() and getLastMeasures() with proper parameters, e.g. MainActivity.

Each request is made using the HTTP library volley.

Quick Start with the apps

  1. Download the sources. We assume that you are using android studio
  2. Import the project : File -> New -> Project from version control -> Github
  3. Set your CLIENT_ID and CLIENT_SECRET and APP_SCOPE in /values/keys.xml
  4. Run the project

Credits

License

Copyright 2013 Netatmo

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.