📝 A demo todo/notes app which demonstrates the use of MVVM architecture, Navigation Component Library, Room Database, LiveData, Coroutines

Last update: May 9, 2022

📝 MyNotes

A demo notes/todo app which demonstrates the use of MVVM architecture, Navigation Component Library, Room Database, LiveData, Coroutines etc.

🎥 Working Demo

🔈 Note

I have used Manual Dependency Injection 💉 method for Injecting Dependencies in the app. If you are a begginer with MVVM then I highly recommend to start with Manual Dependency injection method and then move to Dagger and Hilt.

🔧 Built With

  • Kotlin - Programming Language Used in the app.
  • Navigation Component Library - For setting up app's navigation.
  • Room Database - For persisting data/tasks in device's local storage.
  • Kotlin Coroutines - To execute code asynchronously.
  • Flow - In the simplest of ways consider this as a pipe through which the data flows in the app, by using flow a developer doesn't need to refresh variables which contain data.
  • LiveData - Used to observe the data on the UI layer
  • ViewModel - To Store UI-related data that isnt destroyed on UI changes.
  • RecylerView - To Display data in a list format.

🏗️ Architecture Design

Screenshot 2022-01-18 at 1 31 48 PM

This project is made for educational purposes so don't be shy of asking any questions about any concept from the app or about android developement.

Do open issues and raise PRs to I'll try my best to assist you. 😃

📩 Contact

Don't let yourself get caught in the decision paralysis, just start learning and building. 😉

DM me at 👇

GitHub

https://github.com/avidraghav/MyNotes
Comments
  • 1. Needless Assignment in Collect

    https://github.com/avidraghav/MyNotes/blob/624946c017a9560b51ac571178ac95eb83500847/app/src/main/java/com/raghav/mynotes/ui/AllTasksVM.kt#L25

    Assigning Resource.Loading() to _task variable in the collect lambda does nothing as you are immediately assigning Success to it. Move it outside the scope.

    Reviewed by ravi-kumar7 at 2022-01-19 10:13
  • 2. Replace Toast with Snackbar

    Currently the Toast messages are implemented in such a way that if multiple toast requests are made the previous toast gets cancelled and the latest toast is showed. (One toast message is shown at a time).

    Check File ToastUtils This implementation is causing a Memory leak, this implementation needs to be updated or replaced with an implementation of SnackBar.

    Reviewed by avidraghav at 2022-04-02 07:59
  • 3. Add App Icon

    MyNotes currently has the default app icon. Add an icon to project by reading the guidelines provided such as https://developer.android.com/studio/write/image-asset-studio

    Reviewed by avidraghav at 2022-03-20 10:41
  • 4. Instrumentation Tests for Room Database

    The Second commit contains Instrumentation Tests for Room Database, these can be extended to implement more test cases in future.

    For dependencies used look inside build.gradle(app) under the block Dependencies for Testing. All of them are required except mockito for writing test cases for Room Database. Mockito will be used later to write test cases for other Classes

    Reviewed by avidraghav at 2022-04-10 16:17
  • 5. Add BaseFragment and BaseActivity

    To reduce Boiler plate code Base Classes are used which contains generic code and methods which can be applied to every Activity and Fragment either directly or after overriding. These Base Classes are inherited by Fragments and Activities to implement the required behaviour.

    Reviewed by avidraghav at 2022-04-04 10:53
  • 6. Implement Datastore to store 'Sort By Deadline' flag

    If the user enables the 'Sort By Deadline' checkbox it's state is not saved in the local storage. Hence when the user reopens the app the tasks are not presented in the sorted order.

    Conclusion - Implement Jetpack Datastore Library to store the state of Sort By Deadline checkbox in the local storage.

    Reviewed by avidraghav at 2022-03-20 10:38
  • 7. Add Up Button in the Action Bar for AllTasksFragment

    The App has single activity (MainActivity) and this activity's action bar is used for both the fragments which are inflated inside it. The task is to implement action bar for both fragments and setup a conditional navigation in which an Up Button Screenshot 2022-04-25 at 1 01 25 PM is showed in the action bar of AddTaskFragment but not in the action bar of AllTasksFragment

    The usage of a Up Button is that it should navigate a user back to previous destination of the app he visited but not exit the app https://developer.android.com/guide/navigation/navigation-principles

    Reviewed by avidraghav at 2022-04-25 07:34
Android App using Kotlin, MVVM, ViewModel, LiveData, Coroutines, Room and DataBinding
Android App using Kotlin, MVVM, ViewModel, LiveData, Coroutines, Room and DataBinding

Words Android App using Kotlin, MVVM, ViewModel, LiveData, Coroutines, Room and

Mar 9, 2022
Movies App by MVVM, Coroutines, Retrofit,, Navigation Component, ExoPlayer, Coil and Firebase
Movies App by MVVM, Coroutines, Retrofit,, Navigation Component, ExoPlayer, Coil and Firebase

Show-Time Movies App by MVVM, Coroutines, Retrofit, Navigation Component, ExoPlayer, Coil and Firebase Screens Home Movies Details Movies List Person

May 16, 2022
📊 A Minimal Expense Tracker App built to demonstrate the use of modern android architecture component with MVVM Architecture
📊 A Minimal Expense Tracker App built to demonstrate the use of modern android architecture component with MVVM Architecture

Expenso ?? A Simple Expense Tracker App ?? built to demonstrate the use of modern android architecture component with MVVM Architecture ?? . Made with

May 10, 2022
📒Note taking app, MVVM with Google Architectural components Room, LiveData and ViewModel written in Kotlin, androidx libraries
📒Note taking app, MVVM with Google Architectural components Room, LiveData and ViewModel written in Kotlin, androidx libraries

?? MyNotes Note taking Android App using androidx libraries, MVVM with Google Architectural components Room, LiveData and ViewModel. Written in Kotlin

May 1, 2022
Keep My Notes App Android MVVM architecture
Keep  My Notes App Android MVVM architecture

Keep My Notes My Notes. lien PlayStore Screenshots Architecture This app implements the MVVM architectural . Built with ViewModel - A class designed t

Nov 4, 2021
simple app used Kotlin MVVM Dagger2 Room Coroutines Retrofit2

Exhibits Application which retrieves data from Webserver (via Retrofit), saves it into Room and get from it if user is offline. There are applying MVV

Oct 14, 2021
A sample project in Kotlin to demonstrate AndroidX, MVVM, Coroutines, Hilt, Room, Data Binding, View Binding, Retrofit, Moshi, Leak Canary and Repository pattern.

This repository contains a sample project in Kotlin to demonstrate AndroidX, MVVM, Coroutines, Hilt, Room, Data Binding, View Binding, Retrofit, Moshi, Leak Canary and Repository pattern

May 9, 2022
A sample to showcase Kotlin, MVVM, Koin, Coroutines, StateFlow, Room, WorkManager, Retrofit and Unit test.

TVMaze-Cache A sample to showcase Kotlin, MVVM, Koin, Coroutines, StateFlow, Room, WorkManager, Retrofit and Unit test. Features MVVM Architecture + R

Mar 13, 2022
🎯 Einsen is a prioritization app that uses Eisenhower matrix technique as workflow to prioritize a list of tasks & built to Demonstrate use of Jetpack Compose with Modern Android Architecture Components & MVVM Architecture.
🎯 Einsen is a prioritization app that uses Eisenhower matrix technique as workflow to prioritize a list of tasks & built to Demonstrate use of Jetpack Compose with Modern Android Architecture Components & MVVM Architecture.

?? Einsen Einsen is a prioritization app that uses Eisenhower matrix technique as workflow to prioritize a list of tasks & built to Demonstrate use of

May 15, 2022
This repository contains a detailed sample app that implements MVVM architecture using Hilt, Coroutines, Retrofit and Compose

Saber News App sample project to explain how to build solid, clean architected App using MVVM and repository architecture Techniques Kotlin Clean arch

Dec 26, 2021
GraphQLTrial is a demo application based on modern Android application tech-stacks and MVVM architecture.

GraphQLTrial is a demo application based on modern Android application tech-stacks and MVVM architecture. App fetching data from the netw

Sep 26, 2021
A small demo application based on modern Android application technology stacks and MVVM architecture
A small demo application based on modern Android application technology stacks and MVVM architecture

Pokedex Pokedex es una pequeña aplicación de demostración basada en modernas pil

Dec 17, 2021
❤️ Android Ghibli using Hilt, Motion, Coroutines, Jetpack (ViewModel) based on MVVM architecture.

Glibhi ❤️ Android Ghibli using Hilt, Motion, Coroutines, Jetpack (ViewModel) based on MVVM architecture. Tech stack & Open-source libraries Minimum SD

Mar 11, 2022
Chat App MVVM + Clean ArchitectureChat App MVVM + Clean Architecture
Chat App MVVM + Clean ArchitectureChat App MVVM + Clean Architecture

Chat App MVVM + Clean Architecture This Android application built using MVVM + Clean Architecture architecture approach and is written 100% in Kotlin.

Oct 14, 2021
Android Clean Architecture💎 Base Project Android with Kotlin and MVVM applying clean architecture
 Android Clean Architecture💎 Base Project Android with Kotlin and MVVM applying clean architecture

Android Clean Architecture?? Base Project Android with Kotlin and MVVM applying clean architecture

May 18, 2022
App kotlin with flow, paging 3, MVVM, Room, Dagger hilt

TMDBTest App kotlin with flow, paging 3, MVVM, Room, Dagger hilt Para compilar la app se tiene que descargar el proyecto. Luego poner la APIKEY de TMD

Feb 22, 2022
Clean Architecture - Kotlin, MVVM, Use cases
Clean Architecture - Kotlin, MVVM, Use cases

CleanArchitecture Is Clean Architecture only MVVM ? NO, MVVM is a part of clean architecture. MVVM includes Model, View and ViewModel and in addition

May 13, 2022
A more lightweight and simpler to use MVVM architecture for Android.
A more lightweight and simpler to use MVVM architecture for Android.

A more lightweight and simpler to use MVVM architecture for Android, Data and views are two-way bound.

May 17, 2022