Weather Studio is a weather forecast app built in Kotlin using Retrofit, Gson library and Dexter library.
https://api.openweathermap.org/data/2.5/weather?lat={lat}&lon={lon}&appid=APIkey
https://api.openweathermap.org/data/2.5/weather?lat=44.34&lon=10.99&appid=APIkey
https://openweathermap.org/api
A type-safe HTTP client for Android and Java.
https://square.github.io/retrofit/
Gson is a Java library that can be used to convert Java Objects into their JSON representation. It can also be used to convert a JSON string to an equivalent Java object. Gson can work with arbitrary Java objects including pre-existing objects that you do not have source-code of.
dependencies { implementation 'com.google.code.gson:gson:2.9.1' }
<dependency> <groupId>com.google.code.gson</groupId> <artifactId>gson</artifactId> <version>2.9.1</version> </dependency>
https://github.com/google/gson
Android library that simplifies the process of requesting permissions at runtime.
Include the library in your build.gradle
dependencies{ implementation 'com.karumi:dexter:6.2.3' }
To start using the library you just need to call Dexter with a valid Context:
public MyActivity extends Activity { @Override public void onCreate() { super.onCreate(); Dexter.withContext(activity) .withPermission(permission) .withListener(listener) .check(); } }