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
- Register your Netatmo application: https://dev.netatmo.com/dev/createanapp.
- Extend the NetatmoHttpClient class, e.g. SampleHttpClient.
- Using the previously created class, authenticate your user, e.g. LoginActivity.
- 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
- Download the sources. We assume that you are using android studio
- Import the project : File -> New -> Project from version control -> Github
- Set your CLIENT_ID and CLIENT_SECRET and APP_SCOPE in /values/keys.xml
- Run the project
- Android Volley library: https://developer.android.com/training/volley/index.html
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.