OpenWeatherMap-Android

Additional

Language
Java
Version
N/A
Created
Jun 9, 2016
Updated
Feb 18, 2018 (Retired)
Owner
Fung Lam (seventhmoon)
Contributor
Fung Lam (seventhmoon)
1
Activity
Badge
Generate
Download
Source code

Welcome to OpenWeatherMap-Android

This is a wrapper of OpenWeatherMap for Android platform using Volley.

Sample Application

Sample Application is included in app

How to use

OpenWeatherMapApiHelper helper = new OpenWeatherMapApiHelper(getContext());
    helper.getWeather(22.25, 114.1667, new Response.Listener<WeatherResponseModel>() {
        @Override
        public void onResponse(WeatherResponseModel response) {
            WeatherRecord record = response.getWeatherRecord();
            textViewMessage.setText("Temperature: " + record.getTemperature() + "\nHumidity: " + record.getHumidity());
        }
    }, new Response.ErrorListener() {
        @Override
        public void onErrorResponse(VolleyError error) {
            textViewMessage.setText(error.toString());
        }
    });