OpenWeatherMap-Android-Library You need an API Key to use the OpenWeatherMap API. Head on over to their website if you don't already have one. Download Step 1. Add the JitPack repository to your root build.gradle file. allprojects { repositories { ... maven { url 'https://jitpack.io' } } } Step 2 : Download via Gradle: compile 'com.github.KwabenBerko:OpenWeatherMap-Android-Library:v1.1.2' Note: Remember to include the INTERNET permission to your manifest file Usage Instantiate the OpenWeatherMapHelper class OpenWeatherMapHelper helper = new OpenWeatherMapHelper(); Set your API Key (Required) helper.setApiKey(getString(R.string.OPEN_WEATHER_MAP_API_KEY)); Set your Units (Optional, Standard by default) helper.setUnits(Units.IMPERIAL); Unit Options: Units.IMPERIAL (Fahrenheit) Units.METRIC (Celsius) Set language (default : en) helper.setLang(Lang.ENGLISH); Features (1) Current Weather Get current weather by City Name: helper.getCurrentWeatherByCityName("Accra", new OpenWeatherMapHelper.CurrentWeatherCallback()…
KwabenBerko / OpenWeatherMap-Android-Library
A wrapper for the openweathermap REST API
OpenWeatherMap-Android-Library
You need an API Key to use the OpenWeatherMap API. Head on over to their website if you don't already have one.
Download
Step 1. Add the JitPack repository to your root
build.gradle
file.Step 2 : Download via
Gradle
:compile 'com.github.KwabenBerko:OpenWeatherMap-Android-Library:v1.1.2'
Note: Remember to include the INTERNET permission to your manifest file
Usage
Instantiate the OpenWeatherMapHelper class
Set your API Key (Required)
Set your Units (Optional, Standard by default)
Unit Options:
Units.IMPERIAL (Fahrenheit)
Units.METRIC (Celsius)
Set language (default : en)
Features
(1) Current Weather
Get current weather by City Name: