Skip to content
OpenWeatherMap-Android-Library GitHub Details, Stars and Alternatives | OpenRepoFinder
Home / Repositories / KwabenBerko/OpenWeatherMap-Android-Library KwabenBerko / repository
OpenWeatherMap-Android-Library A wrapper for the openweathermap REST API
#android #android-library #java #java-library #openweathermap #openweathermap-android
View Repository on GitHub ↗ REPOSITORY OVERVIEW Live repository statistics ★ 106 Stars
⑂ 33 Forks
◯ 1 Open issues
◉ 106 Watchers
73 /100
OPENREPOHUB HEALTH SIGNAL Healthy signals A transparent discovery signal based on current public GitHub metadata.
Recent activity35% weight
72 Community adoption25% weight
40 Maintenance state20% weight
100 License clarity10% weight
100 Project information10% weight
75 This score does not audit code, security, maintainers, documentation quality, or suitability. Verify the repository and its current documentation before adoption.
README preview 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:
implementation 'com.github.KwabenBerko:OpenWeatherMap-Android-Library:2.1.0'
Note: Remember to include the INTERNET permission to your manifest file
Usage
Instantiate Class With Your OpenWeatherMap Api Key
OpenWeatherMapHelper helper = new OpenWeatherMapHelper(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 your Language (ENGLISH by default)
helper.setLanguage(Languages.ENGLISH);
Features
(1) Current Weather
Get current weather by City Name:
helper.getCurrentWeatherByCityName("Accra", new CurrentWeatherCallback() {
@Override
public void onSuccess(CurrentWeather currentWeather) {
Log.v(TAG, "Coordinates: " + currentWeather.getCoord().getLat() + ", "+currentWeather.getCoord().getLon() +"\n"
+"Weather Description: " + currentWeather.getWeather().get(0).getDescription() + "\n"
+"Temperature: " + currentWeather.getMain().getTempMax()+"\n"
+"Wind Speed: " + currentWeather.getWind().getSpeed() + "\n"
+"City, Country: " + currentWeather.getName() + ", " + currentWeather.getSys().getCountry()
);
}
@Override
public void onFailure(Throwable throwable) {
Log.v(TAG, throwable.getMessage());
}
});
Get current weather by City ID:
helper.getCurrentWeatherByCityID("524901", new CurrentWeatherCallback() {
@Override
public void onSuccess(CurrentWeather currentWeather) {
Log.v(TAG, "Coordinates: " + currentWeather.getCoord().getLat() + ", "+currentWeather.getCoord().getLon() +"\n"
+"Weather Description: " + currentWeather.getWeather().get(0).getDescription() + "\n"
+"Temperature: " + currentWeather.getMain().getTempMax()+"\n"
+"Wind Speed: " + currentWeather.getWind().getSpeed() + "\n"
+"City, Country: " + currentWeather.getName() + ", " + currentWeather.getSys().getCountry()
);
}
@Override
public void onFailure(Throwable throwable) {
Log.v(TAG, throwable.getMessage());
}
});
ALGORITHMICALLY RELATED Similar Open-Source Projects Selected from shared topics, language and repository description—not editorial ratings.
Spotify Web API wrapper for Kotlin, Java, JS, and Native - Targets JVM, Android, JS (browser), Native (Desktop), and Apple tvOS/iOS. Includes a Spotify Web Playback SDK wrapper for Kotlin/JS, and a spotify-auth wrapper for Kotlin/Android.
79 /100 healthRecently updated Active repository Has homepage
KotlinMIT #android #android-library #api #java
⑂ 25 forks ◯ 13 issues Updated today
Project homepage ↗ An wrapper for newsapi.org
48 /100 healthActive repository
JavaMIT #android #android-library #java #java-library
⑂ 15 forks ◯ 4 issues Updated Sep 1, 2025
Get current weather by Geographic Coordinates: helper.getCurrentWeatherByGeoCoordinates(5.6037, 0.1870, new CurrentWeatherCallback() {
@Override
public void onSuccess(CurrentWeather currentWeather) {
Log.v(TAG, "Coordinates: " + currentWeather.getCoord().getLat() + ", "+currentWeather.getCoord().getLon() +"\n"
+"Weather Description: " + currentWeather.getWeather().get(0).getDescription() + "\n"
+"Temperature: " + currentWeather.getMain().getTempMax()+"\n"
+"Wind Speed: " + currentWeather.getWind().getSpeed() + "\n"
+"City, Country: " + currentWeather.getName() + ", " + currentWeather.getSys().getCountry()
);
}
@Override
public void onFailure(Throwable throwable) {
Log.v(TAG, throwable.getMessage());
}
});
Get current weather by Zip Code: helper.getCurrentWeatherByZipCode("90003", new CurrentWeatherCallback() {
@Override
public void onSuccess(CurrentWeather currentWeather) {
Log.v(TAG, "Coordinates: " + currentWeather.getCoord().getLat() + ", "+currentWeather.getCoord().getLon() +"\n"
+"Weather Description: " + currentWeather.getWeather().get(0).getDescription() + "\n"
+"Temperature: " + currentWeather.getMain().getTempMax()+"\n"
+"Wind Speed: " + currentWeather.getWind().getSpeed() + "\n"
+"City, Country: " + currentWeather.getName() + ", " + currentWeather.getSys().getCountry()
);
}
@Override
public void onFailure(Throwable throwable) {
Log.v(TAG, throwable.getMessage());
}
});
(2) 5 day / 3 hour forecast
Get three hour forecast by City Name: helper.getThreeHourForecastByCityName("Pretoria", new ThreeHourForecastCallback() {
@Override
public void onSuccess(ThreeHourForecast threeHourForecast) {
Log.v(TAG, "City/Country: "+ threeHourForecast.getCity().getName() + "/" + threeHourForecast.getCity().getCountry() +"\n"
+"Forecast Array Count: " + threeHourForecast.getCnt() +"\n"
//For this example, we are logging details of only the first forecast object in the forecasts array
+"First Forecast Date Timestamp: " + threeHourForecast.getList().get(0).getDt() +"\n"
+"First Forecast Weather Description: " + threeHourForecast.getList().get(0).getWeather().get(0).getDescription()+ "\n"
+"First Forecast Max Temperature: " + threeHourForecast.getList().get(0).getMain().getTempMax()+"\n"
+"First Forecast Wind Speed: " + threeHourForecast.getList().get(0).getWind().getSpeed() + "\n"
);
}
@Override
public void onFailure(Throwable throwable) {
Log.v(TAG, throwable.getMessage());
}
});
Get three hour forecast by City ID: helper.getThreeHourForecastByCityID("524901", new ThreeHourForecastCallback() {
@Override
public void onSuccess(ThreeHourForecast threeHourForecast) {
Log.v(TAG, "City/Country: "+ threeHourForecast.getCity().getName() + "/" + threeHourForecast.getCity().getCountry() +"\n"
+"Forecast Array Count: " + threeHourForecast.getCnt() +"\n"
//For this example, we are logging details of only the first forecast object in the forecasts array
+"First Forecast Date Timestamp: " + threeHourForecast.getList().get(0).getDt() +"\n"
+"First Forecast Weather Description: " + threeHourForecast.getList().get(0).getWeather().get(0).getDescription()+ "\n"
+"First Forecast Max Temperature: " + threeHourForecast.getList().get(0).getMain().getTempMax()+"\n"
+"First Forecast Wind Speed: " + threeHourForecast.getList().get(0).getWind().getSpeed() + "\n"
);
}
@Override
public void onFailure(Throwable throwable) {
Log.v(TAG, throwable.getMessage());
}
});
Get three hour forecast by Geographic Coordinates: helper.getThreeHourForecastByGeoCoordinates(6.5244,3.3792, new ThreeHourForecastCallback() {
@Override
public void onSuccess(ThreeHourForecast threeHourForecast) {
Log.v(TAG, "City/Country: "+ threeHourForecast.getCity().getName() + "/" + threeHourForecast.getCity().getCountry() +"\n"
+"Forecast Array Count: " + threeHourForecast.getCnt() +"\n"
//For this example, we are logging details of only the first forecast object in the forecasts array
+"First Forecast Date Timestamp: " + threeHourForecast.getList().get(0).getDt() +"\n"
+"First Forecast Weather Description: " + threeHourForecast.getList().get(0).getWeather().get(0).getDescription()+ "\n"
+"First Forecast Max Temperature: " + threeHourForecast.getList().get(0).getMain().getTempMax()+"\n"
+"First Forecast Wind Speed: " + threeHourForecast.getList().get(0).getWind().getSpeed() + "\n"
);
}
@Override
public void onFailure(Throwable throwable) {
Log.v(TAG, throwable.getMessage());
}
});
Get three hour forecast by Zip Code: helper.getThreeHourForecastByZipCode("94040", new ThreeHourForecastCallback() {
@Override
public void onSuccess(ThreeHourForecast threeHourForecast) {
Log.v(TAG, "City/Country: "+ threeHourForecast.getCity().getName() + "/" + threeHourForecast.getCity().getCountry() +"\n"
+"Forecast Array Count: " + threeHourForecast.getCnt() +"\n"
//For this example, we are logging details of only the first forecast object in the forecasts array
+"First Forecast Date Timestamp: " + threeHourForecast.getList().get(0).getDt() +"\n"
+"First Forecast Weather Description: " + threeHourForecast.getList().get(0).getWeather().get(0).getDescription()+ "\n"
+"First Forecast Max Temperature: " + threeHourForecast.getList().get(0).getMain().getTempMax()+"\n"
+"First Forecast Wind Speed: " + threeHourForecast.getList().get(0).getWind().getSpeed() + "\n"
);
}
@Override
public void onFailure(Throwable throwable) {
Log.v(TAG, throwable.getMessage());
}
});
Upcoming Features
Hourly Forecast 4 days
Daily Forecast 16 days
Wrapper for Android permission API
43 /100 health
JavaMIT #android #android-library #java #permissions
⑂ 0 forks ◯ 0 issues Updated Aug 8, 2019
Spotify Web API wrapper for Kotlin Multiplatform
76 /100 healthRecently updated Active repository Has homepage
KotlinApache-2.0 #android #android-library #api-wrapper #ios
⑂ 0 forks ◯ 0 issues Updated 6 days ago
Project homepage ↗ SmartAds: The ultimate Android AdMob wrapper for high-performance monetization Super Complete Android Library. Simplify Banner, Interstitial, Rewarded, App Open, and Native ads with lifecycle safety, automated UMP (GDPR) consent, and multi-network mediation.
46 /100 healthActive repository
JavaNo license #admob #admob-sdk #ads #android
⑂ 1 forks ◯ 0 issues Updated Mar 20, 2026
series of java convenience functions used by various of my projects. Most notably a wrapper of the android library for java desktop.
37 /100 healthActive repository
JavaApache-2.0
⑂ 0 forks ◯ 0 issues Updated Feb 25, 2020