Android playground project with modularization by feature (android libraries), unit tests, MVVM & MVI.

Overview

GitHub Cards Preview

build

Movies

Movies is a simple project to study and play with some android components, architecture and tools for Android development.

Tech Stack

This project uses feature modularization architecture. The movies feature module uses MVI as software design patter for presentation layer, and the actors feature module uses MVVM. You can checkout how was the migration from MVVM to MVI in this pull request.

Medium blogs

I write about the process of coding this project in the following blogs:

Development setup

You require the latest Android Studio 4.2 (stable channel) to be able to build the app. For the compose branch use the latest Android Studio on the canary channel.

Libraries

API keys

You need to supply API / client keys for the service the app uses.

Once you obtain the key, you can set them in your ~/local.properties:

# Get this from TMDb
tmdb.key=<insert>

📃 License

Copyright 2021 Christopher Elias

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
You might also like...
Simple Notes app, MVVM with Google Architectural components Room database, LiveData and ViewModel. Written in Kotlin using androidx libraries
Simple Notes app, MVVM with Google Architectural components Room database, LiveData and ViewModel. Written in Kotlin using androidx libraries

Simple Notes app, MVVM with Google Architectural components Room database, LiveData and ViewModel. Written in Kotlin using androidx libraries. Implemented Firebase Auth and Database, and used Room database

 Math World is an Android Application specialized in mathematics, where the application includes some sections related to arithmetic, unit conversion, scientific math laws and constants, as well as some mathematical questions that need some intelligence to reach the solution.
Math World is an Android Application specialized in mathematics, where the application includes some sections related to arithmetic, unit conversion, scientific math laws and constants, as well as some mathematical questions that need some intelligence to reach the solution.

Math World is an Android Application specialized in mathematics, where the application includes some sections related to arithmetic, unit conversion, scientific math laws and constants, as well as some mathematical questions that need some intelligence to reach the solution.

Clean Architecture Kotlin Multiplatform Mobile (KMM) with Android Instrument Test and Unit Test
Clean Architecture Kotlin Multiplatform Mobile (KMM) with Android Instrument Test and Unit Test

The-Movies: Clean Architecture Kotlin Multiplatform Mobile What're inside? - Jetpack Compose - Hilt - Ktor - Android Instrument Test - Unit Test - SQL

Twidere-Android Twidere is a powerful twitter client for Android 1.6+ 1 , which gives you a full Holo experience and nearly full Twitter's feature.
Twidere-Android Twidere is a powerful twitter client for Android 1.6+ 1 , which gives you a full Holo experience and nearly full Twitter's feature.

Twidere for Android Material Design ready and feature rich Twitter/Mastodon/Fanfou app for Android 4.1+. Enjoy Fediverse now! Twidere-Android is maint

Feature toggle library for Android
Feature toggle library for Android

FeatureToggle Feature toggle library for Android. Overview FeatureToggle library allows to configure features of Android application in runtime using

Awesome Kid's Drawing App. It has a click and draws feature.

CanvaKids Overview It's a kid's drawing app which is build for android users. It is built in Kotlin with some very good practices involved.

The simplest version of a notepad application with the feature to save pictures on a note.

PhotoNotePad Easy to write, read and organize notes with photo(s). Feature A note has... title content date color pin images Easy to write a note. Pro

This app contains feature barcode and QR scanner, and video recording in-app.

BarcodeQRScannerAndVideoRecord This app contains feature barcode and QR scanner, and video recording in-app. Scanner using ML Kit and CameraX. Video R

DroidFish is a feature-rich graphical chess user interface, combined with the very strong Stockfish chess engine.
DroidFish is a feature-rich graphical chess user interface, combined with the very strong Stockfish chess engine.

Introduction DroidFish is a feature-rich graphical chess user interface, combined with the very strong Stockfish chess engine. DroidFish is primarily

Comments
  • MVI

    MVI

    Fix the double emission of the initial intent. But... not so happy with the current solution. I will try to improve in the following days. Gotta read more about kotlin flows.

    opened by ChristopherME 0
  • Movies feature memoryleak

    Movies feature memoryleak

    The MovieListFragment is presenting the following issues:

    1. The initial intent is fired every time the fragment view get's recreated.
    2. The intents() flow is leaking the fragment view because it's collected inside viewmodel scope.
    bug help wanted 
    opened by ChristopherME 0
  • Navigation Extensions

    Navigation Extensions

    I want to know what happens when the MovieListFragment (MVI pattern) gets resumed after being replaced & added to the back stack. But, with the jetpack navigation library that's impossible if I don't' do some tricks/hacks for provide this functionality (and I'm not in the mood of integrating those "hacks", I prefer toy play a little bit with other solutions).

    I'm going to stop using jetpack navigation library (only for this moment, I still have a little bit of faith to the library), because of the following reasons:

    1. IMHO, I feel it doesn't scale well with feature modularized projects. You have to add a new navigation.xml file on each feature module, define the navigation there & more.
    2. It does NOT support addToBackStack by default! You have to implement some "hacks" in order to accomplish this behavior. They recently release a new alpha version that was supposed to fix this, but it's buggy and will be fixed on the next release.
    3. I want to navigate and addToBackStack fragments as easily as possible, without interrupt my coding flow or get out from my kotlin class to XML again only for define the navigation!!!

    That's why I create a library that is built on top of the FragmentTransactions API. It does NOT add any extra functionality, it just make work with the API easier.

    Probably going to roll back to jetpack navigation when they fix the addToBackStack thing, but for now, I prefer to create this small library. Also, I'm going to use this PR for teach some of the benefits of modularization in other blogs.

    opened by ChristopherME 0
Owner
Christopher Elias
Android developer writing android apps since 2016.
Christopher Elias
Small app to demonstrate app modularization combined with clean architecture

Football Hightlights Sample Sample project, exploring the app Modularization in combination with some concepts of the clean architecture, in particula

null 1 Oct 31, 2021
MVVM + Kotlin + Jetpack Compose +Navigation Compose + Hilt + Retrofit + Unit Testing + Compose Testing + Coroutines + Kotlin Flow + Io mockK

MvvmKotlinJetpackCompose Why do we need an architecture even when you can make an app without it? let's say you created a project without any architec

Sayyed Rizwan 46 Nov 29, 2022
This project shows trending github repositories using MVI (Model View Intent) using kotlin flows and multi module clean architecture

GithubTrendingMVIFlow Build Architecture: This project shows trending github repositories using MVI (Model View Intent) using kotlin flows and multi m

Zulqurnain Haider 0 Jun 2, 2022
A project for the implementation of the car animation feature in most ride-sharing/ food delivery apps

CarAnimation This is a test project to practice the implementation of the car animation feature in most ride-sharing/ food delivery apps. Slowly build

Samurai 45 Dec 23, 2022
A demo project showcasing different exercises + details with prepopulated data from room. Includes tests

README Pre-requisites I used Android Studio Bumblebee (2021.1.1). In case of any issues, do let me know because I understand that issues might vary fo

Carol 24 Nov 17, 2022
Android Bitcoin market app base on Jetpack Compose and MVI. The app displays current bitcoin market price and history price k-line charts.

compose-bitcoin Android Bitcoin market app base on Jetpack Compose and MVVM & MVI. Features Current bitcoin market price. K-line charts of history pri

Chen Pan 3 May 20, 2022
Wallpaper app made using Hilt, Retrofit, Room, Navigation Components, MVI, Coroutines, Flows, ViewModel, LiveData, Datastore Preference.

Android Picture Engine Wallpaper app made using Hilt, Retrofit, Room, Navigation Components, MVI, Coroutines, Flows, ViewModel, LiveData, Datastore Pr

Simone Conigliaro 59 Sep 27, 2022
Kata to practice Clean Architecture & MVI by building TodoList Application

Mvi Todo Kata Application Features TODO specification Title Description Due Date Priority Supported Operations Create a new TODO Remove a TODO Select

seungmin shin 0 Nov 3, 2021
A sample app illustrating Android development using Kotlin with MVVM architecture, Android Jetpack, and other commonly used libraries.

Anime Facts A sample app illustrating Android development using Kotlin with MVVM architecture, Android Jetpack, and other commonly used libraries. Ani

Eugene Javiñas 0 Dec 5, 2021
It is a NBAApp developed by Kotlin. It uses MVVM design pattern, Coroutines, Retrofit and JetPack libraries like Room, Lifecycle, ViewBinding, DataBinding, Hilt and Navigation.

NbaApp It is a NBAApp developed by Kotlin. It uses MVVM design pattern, Coroutines, Retrofit and JetPack libraries like Room, Lifecycle, ViewBinding,

Tuna Ateş Koç 2 Feb 26, 2022