/PowerfulAndroidApp

This app is incredibly awesome. Here I use all kind of Jetpack Components. Use Rest Api and Cache. Single Source of Truth Principle. Dagger 2, Kotlin. MVI Acrhitecture and a lot more

Primary LanguageKotlin

PowerfulAndroidApp

This app is incredibly awesome. Here I use all kind of Jetpack Components. Use Rest Api and Cache. Single Source of Truth Principle. Dagger 2, Kotlin. MVI Acrhitecture and a lot more The data that has been looked already will be saved to a Cache using Room library. Then if the user does not have internet, the data from the cache will be shown in the app. The logic is covered here. The MVI architecture that I use in this app

MVI Architecture

MVI (Model-View-Intent) architecture is the kind of MVVM (Model-View-ViewModel), but with more features. The most big advantage of this architecture is if your app has many fragments in one activity, your ViewModel is getting massive and uncomprehendable. So MVI is ready to help! HERE IS THE GUIDE

alt text alt text

How to start/plan MVI Architecture

Many of us know MVI Architecture pretty well. But sometimes it is very hard to plan your classes and what packages are gonna be used. So this picture shows you the step by step plan how to start and implement MVI Architecture

alt text

JetPack Navigation Components and BottomNavController

Custom bottom navigation controller. Helps to easily manage the back stack of fragments The core concept took from here

alt text

User Authentication Token

User cannot see and create any blog unless he has been logged in successfully and he has the memeber subscription. Each member subscription has his own TOKEN. After he logged in app checks this TOKEN and respond ERROR or SUCCESS. In this application I use the same logic as the most common apps do. If the user closes the appication, and opens it tomorrow, app will authenticate user automatically using saved AUTH TOKEN in SessionManager class. After user logged out, the AUTH TOKEN will be deleted from SessionManager class

Here are stuff that I am using:

  • Kotlin:
  • Coroutines:
    1. Advanced coroutine management using jobs
    2. Cancelling active jobs
    3. Coroutine scoping
  • Navigation Components:
    1. Bottom Navigation View with fragments
    2. Leveraging multiple navigation graphs (this is cutting edge content)
  • Dagger 2:
    1. custom scopes, fragment injection, activity injection, Viewmodel injection
  • MVI architecture:
    1. Basically this is MVVM with some additions
    2. State management
    3. Building a generic BaseViewModel
    4. Repository pattern (NetworkBoundResource)
  • Room Persistence:
    1. SQLite on Android with Room Persistence library
    2. Custom queries, inserts, deletes, updates
    3. Foreign Key relationships
    4. Multiple database tables
  • Cache:
    1. Database caching (saving data from network into local cache)
    2. Single source of truth principal
  • Retrofit 2:
    1. Handling any type of response from server (success, error, none, etc...)
    2. Returning LiveData from Retrofit calls (Retrofit Call Adapter)
  • ViewModels:
    1. Sharing a ViewModel between several fragments
    2. Building a powerful generic BaseViewModel
  • WebViews:
    1. Interacting with the server through a webview (Javascript)
  • SearchView:
    1. Programmatically implement a SearchView
    2. Execute search queries to network and db cache
  • Images:
    1. Selecting images from phone memory
    2. Cropping images to a specific aspect ratio
    3. Setting limitations on image size and aspect ratio
    4. Uploading a cropped image to server
  • Network Request Management:
    1. Cancelling pending network requests (Kotlin coroutines)
    2. Testing for network delays
  • Pagination:
    1. Paginating objects returned from server and database cache
  • Material Design:
    1. Bottom Navigation View with Fragments
    2. Customizing Bottom Navigation Icon behavior
    3. Handling Different Screen Sizes (ConstraintLayout)
    4. Material Dialogs
    5. Fragment transition animations