Weather App Android Mvvm Dagger

Weather App Android Mvvm Dagger
Alternatives To Weather App Android Mvvm Dagger
Project NameStarsDownloadsRepos Using ThisPackages Using ThisMost Recent CommitTotal ReleasesLatest ReleaseOpen IssuesLicenseLanguage
Weatherapp453
2 years ago1mitKotlin
5 Day Forecast app that works on Android and uses latest tools (Kotlin, Navigation, Room, LiveData, Databinding, Dagger 2)
Reactiveweatherexample204
5 years ago1mitSwift
A simple iOS weather app using the MVVM pattern and RxSwift framework.
Weather Swiftui45
4 years ago4Swift
A weather app that uses the Dark Sky API built using SwiftUI! Get the current weather for a particular location and check out the 5-day forecast!
Weather App Android Mvvm31
a year agoKotlin
Simple MVVM practice repository for very very beginners. You don't need to know about Dagger, Coroutine or Rx for understanding MVVM and this project. To check the MVVM Architecture Bengali Tutorial visit my blog site
Myweather31
3 years agoJava
App displays real-time weather updates for user's location and for other locations set by user. App uses MVVM with Repository pattern, dagger dependency injection, NetworkBoundResource, Navigation component, App widget, Alarm manager, and other Android JetPack components (Room, Viewmodel, Livedata)
Kingweather19
4 years ago1mitKotlin
:cloud: 一个基于Jetpack构建的MVVM天气预报APP。你值得拥有的MVVM快速开发框架:https://github.com/jenly1314/MVVMFrame
Tddweatherapp18
4 years agoKotlin
Android App trying to apply TDD and using MVVM, Kotlin Coroutines
Myweatherkotlinflow15
3 years agoJava
Android app that shows weather at your current location or any custom location you specify. Uses Kotlin Flow for data streaming and coroutines for asynchronous work. Also leverages Room, navigation component, Viewmodel and Livedata Jetpack components with MVVM presentation layer architecture. Dagger 2 with Dagger android for dependency injection
Weatherapp13
3 years agoJava
AmapWeatherApp(高德天气):an amap-weather android app that implements MVVM architecture using LiveData, ViewModel, Room, DataBinding, WorkManager, and Retrofit2&Rxjava2.
Metio9
5 years agomitObjective-C
iOS app that displays your local weather in a simple, intuitive language
Alternatives To Weather App Android Mvvm Dagger
Select To Compare


Alternative Project Comparisons
Readme

Android MVVM Weather App (Kotlin + Retrofit + Dagger)

MVVM Architecture is one of the most popular and latest architecture to develop a maintanable and managable codebase. We are developing a sample Weater Forecast Android App with MVVM Architecture using Kotlin language and Retrofit network calling library. For simplification, I didn't use Coroutine or Rx in this project. My main focus is to implement MVVM and Dagger 2 dependency injection library as simple as possible.

If you are not familiar with MVVM architecture, then I recommend you to check this MVVM respository with same Weather App project. In that project, you'll find simple MVVM implementation without Dagger. After completion of that project, you can continue this repository.

Same weather app project is available for Flutter in this repository.

Prerequisites

Basic Kotlin and knowledge of HTTP request by Retrofit library are required for this project. If you already know MVP Architecture then this project will be very easy to understand. You can check my MVP Architecture Weather App repository from here. It will be helpful if you cover the MVP project then compare between MVP and MVVM. There is my another repository where I've implemented same weather App in MVVM architecture without Dagger.

Project Description

We will develop a weather forecast Android Application with MVP architecture. The UI will be as like as above screenshot. There is a Spinner with some City name. After selection a city user need to hit the View Weather button. Then App will send request to Open Weather web API and show the weather information in the UI.

Open Weather API

We will use Open Weather Map API for collecting weather information. To get the real weather information of a city, you need to sign up and get your own APP ID. Otherwise you can test the API with their sample BASE URL and sample APP ID without creating account.

Project Setup

Clone the project and open it using Android Studio. Then open your local.properties file under Gradle Scripts. You need to specify the base_url and app_id in your local.properties file. Store your API secret in plain string file or Kotlin file is very risky. For security purpose it's better store in local.properties file than plain string/Kotlin file.

Use Sample API without creating account

Add below lines at the end of your local.properties file. Then run the project. You'll get dummy or static API response from Open Weather API.

#this is sample Base URL
base_url=https://samples.openweathermap.org/data/2.5/

#this is sample App ID of Open Weather API
app_id=b6907d289e10d714a6e88b30761fae22

Use Real APP ID after sign up and activation of your APP ID

After Sign up at the website collect your own APP ID from their API Keys page. Then add below lines with your APP ID at the end of local.properties file.

#this is real Base URL
base_url=http://api.openweathermap.org/data/2.5/

#this is real App ID of Open Weather API
app_id=YOUR_OWN_APP_ID

The BASE URL and APP ID will be fetched from build.gradle file and will be stored it in BuildConfig. And Retrofit API call will use the BASE URL and APP ID from BuildConfig.

Note: The free version of Open Weather API allows maximum 60 API calls per minute.

Run the project

Sync the Gradle and run the project. Install APK on your emulator or real device. Turn on the internet of your testing device. For better understanding, please read the comments of every methods. Hope, these comments will help you to feel the MVVM Architecture.

Disclaimer

There are some other ways of implementation of MVVM. For simplicity, I've ignored RxJava in this project. I will create another repository of MVVM with Rx.

Popular Weather Projects
Popular Mvvm Projects
Popular Command Line Interface Categories
Related Searches

Get A Weekly Email With Trending Projects For These Categories
No Spam. Unsubscribe easily at any time.
Kotlin
Weather
Mvvm
Android Studio
Mvp
Kotlin Android
Retrofit2
Dagger
Mvvm Architecture
Dagger2
Dagger2 Android