Movie Android App written in Kotlin, MVVM, RxJava, Coroutine (Upcoming), Android Architecture Components and Jetpack Compose (Upcoming).

Overview

MovieHunt

MovieHunt is a sample Android project using The Movie DB API based on MVVM architecture. It showcases the latest Android tech stacks with well-designed architecture and best practices.

The new v2 re-design is available. πŸŽ‰ Check it out now!

MovieHunt

Features

  • 100% Kotlin
  • MVVM architecture
  • Reactive pattern
  • Android architecture components and Jetpack libraries
  • Single activity pattern
  • Dependency injection
  • CI support (Upcoming)
  • Testing (Upcoming)

Tech Stacks

  • Retrofit + OkHttp - RESTful API and networking client.
  • Koin - Dependency injection.
  • Android Architecture Components - A collections of libraries that help you design rebust, testable and maintainable apps.
    • Room - Local persistence database.
    • Paging - Pagination loading for RecyclerView.
    • ViewModel - UI related data holder, lifecycle aware.
    • LiveData - Observable data holder that notify views when underlying data changes.
    • Data Binding - Declarative way to bind data to UI layout.
    • Navigation component - Fragment routing handler. (Upcoming)
    • WorkManager - Tasks scheduler in background jobs. (Upcoming)
  • RxJava - Asynchronous programming with observable streams. Replaced by Coroutine + Flow.
  • (Upcoming) Flow Stream of value that returns from suspend function.
  • (Implementing) Coroutine Concurrency design pattern for asynchronous programming.
  • Epoxy - Simplified way to build complex layout in RecyclerView. Replaced by Jetpack Compose.
  • Coil - Image loading.
  • Timber - Extensible API for logging.
  • (Implementing) Jetpack Compose - Declarative and simplified way for UI development.

ScreenShots πŸ“·

Architectures

MVVM

We follow Google recommended Guide to app architecture to structure our architecture based on MVVM, reactive UI using LiveData / RxJava observables and data binding.

  • View: Activity/Fragment with UI-specific logics only.
  • ViewModel: It keeps the logic away from View layer, provides data streams for UI and handle user interactions.
  • Model: Repository pattern, data layers that provide interface to manipulate data from both the local and remote data sources. The local data sources will serve as single source of truth.

Package Structures

com.enginebai.moviehunt # Root Package
β”œβ”€β”€ data                # For data modeling layer
β”‚   β”œβ”€β”€ local           # Local persistence database
|   β”‚   β”œβ”€β”€ dao         # Data Access Object for Room
|   |   β”œβ”€β”€ model       # Model classes
β”‚   β”œβ”€β”€ remote          # Remote data source
β”‚   └── repo            # Repositories for single source of data
|
β”œβ”€β”€ di                  # Dependency injection modules
β”‚
β”œβ”€β”€ ui                  # Fragment / View layer
β”‚   β”œβ”€β”€ list            # List screen Fragment and ViewModel
β”‚   β”œβ”€β”€ home            # Main screen Fragment and ViewModel
|   β”‚   β”œβ”€β”€ controller  # Epoxy controller for RecyclerView
|   β”‚   └── models      # Epoxy models for RecyclerView
β”‚   └── details         # Detail screen Fragment and ViewModel
|
β”œβ”€β”€ utils               # Utility Classes / Kotlin extensions
β”œβ”€β”€ MainActivity        # Single activity
β”œβ”€β”€ AppContext          # Application
└── NavigationRouter    # Navigation controller

API Key πŸ”‘

You will need to provide developer key to fetch the data from TMDB API.

  • Generate a new key (v3 auth) from here. Copy the key and go back to Android project.
  • Create a new kotlin file ApiKey.kt in path ./buildSrc/src/main/kotlin/.
  • Define a constant TMDB_API_KEY with the double quotes, it looks like
const val TMDB_API_KEY = "\"90c05******************655\""
  • Add the key to build config in ./buildSrc/src/main/kotlin/Config.kt:
defaultConfig {
    ...
    buildConfigField("String", "TMDB_API_KEY", TMDB_API_KEY)
    ...
}
  • Perform gradle sync.

NOTE: It's important to keep the double quotes for this value, since it's used as String type build config fields, the field name in quotes, the field value in escaped quotes additionally. If you're missing the double quotes, it will build fail.

LICENSE

Copyright (c) 2020 Engine Bai

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Comments
  • sqlite build error

    sqlite build error

    ζ–°ζ‰‹ζŒ‡ζ•™ Describe the bug Caused by: java.lang.Exception: No native library is found for os.name=Mac and os.arch=aarch64. path=/org/sqlite/native/Mac/aarch64 at org.sqlite.SQLiteJDBCLoader.loadSQLiteNativeLibrary(SQLiteJDBCLoader.java:333) at org.sqlite.SQLiteJDBCLoader.initialize(SQLiteJDBCLoader.java:64) at androidx.room.verifier.DatabaseVerifier.(DatabaseVerifier.kt:71) ... 50 more

    bug 
    opened by YYxDeveloper 4
  • Fail to start trailer activity

    Fail to start trailer activity

    java.lang.IllegalArgumentException: Service Intent must be explicit: Intent { act=com.google.android.youtube.api.service.START }
                at android.app.ContextImpl.validateServiceIntent(ContextImpl.java:1786)
                at android.app.ContextImpl.bindServiceCommon(ContextImpl.java:1885)
                at android.app.ContextImpl.bindService(ContextImpl.java:1863)
                at android.content.ContextWrapper.bindService(ContextWrapper.java:538)
                at com.google.android.youtube.player.internal.r.e(Unknown Source)
                at com.google.android.youtube.player.YouTubeThumbnailView.initialize(Unknown Source)
                at com.moviebomber.ui.activity.TrailerActivity$TrailerAdatper$ViewHolder.<init>(TrailerActivity.java:126)
                at com.moviebomber.ui.activity.TrailerActivity$TrailerAdatper.getView(TrailerActivity.java:93)
    
    bug v1 
    opened by enginebai 4
  • App Name in Uppercase and change of message when app is not connected to internet.

    App Name in Uppercase and change of message when app is not connected to internet.

    Giving Upper case to the app name attract more number of users, it even look more attractive. The internet connection error message has now changed to " Opps!!! You are not connected to internet "

    opened by Shalmontitre 2
  • Add admob to list

    Add admob to list

    • https://developers.google.com/mobile-ads-sdk/docs/admob/android/quick-start?hl=zh-tw#place_an_adview_in_your_main_activity_layout
    • https://developers.google.com/mobile-ads-sdk/docs/?hl=zh_TW
    • https://developers.google.com/mobile-ads-sdk/download?hl=zh_TW
    v1 
    opened by enginebai 2
  • (WIP) UI re-design

    (WIP) UI re-design

    Home

    Now Playing List

    Lager Horizontal List

    • Poster
    • Title
    • Rating
    • Review
    • Runtime
    • Release date

    Small Horizontal List

    Popular, trending, top rated,

    • Poster
    • Title

    Upcoming Vertical List

    • Backdrop
    • Title
    • Release date
    • Runtime

    Detail

    • Posters
      • Images
    • Title
    • Overview
    • Rating
    • Reviews
      • Review list
    • Runtime
    • Release date
    • Genres
    • Trailers
    • Casts
    • Similar movie
    • Recommendation movie
    feature 
    opened by enginebai 1
  • Fail to parse date from json response

    Fail to parse date from json response

    com.google.gson.JsonSyntaxException: 2015-05-08
                at com.google.gson.DefaultDateTypeAdapter.deserializeToDate(DefaultDateTypeAdapter.java:107)
                at com.google.gson.DefaultDateTypeAdapter.deserialize(DefaultDateTypeAdapter.java:82)
                at com.google.gson.DefaultDateTypeAdapter.deserialize(DefaultDateTypeAdapter.java:35)
                at com.google.gson.TreeTypeAdapter.read(TreeTypeAdapter.java:58)
                at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.read(ReflectiveTypeAdapterFactory.java:103)
                at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:196)
                at com.google.gson.Gson.fromJson(Gson.java:810)
                at com.google.gson.Gson.fromJson(Gson.java:775)
                at com.google.gson.Gson.fromJson(Gson.java:724)
                at com.google.gson.Gson.fromJson(Gson.java:696)
                at com.moviebomber.ui.fragment.MovieListFragment$3.onSuccess(MovieListFragment.java:158)
    
    bug v1 
    opened by enginebai 1
  • Migrating paging library 2 to 3

    Migrating paging library 2 to 3

    Goals

    As we're going to develop Jetpack Compose, since Jetpack Compose supports paging library 3 only, we have to migrate paging library from 2 to 3 first.

    Follow the migration guide from android developer document, there a a few components needed to be migrated, and we keep using RxJava temporarily, we have a plan to migrate to corouting later.

    feature 
    opened by enginebai 0
  • Jetpack compose for movie detail

    Jetpack compose for movie detail

    Goals

    Migrate from Epoxy to Jetpack Compose in movie detail screen. (#72) We migrate this screen first since other parts, especially for the list, that requires the Paging 3 migration before.

    feature 
    opened by enginebai 0
  • Feature/landscape + portrait list

    Feature/landscape + portrait list

    Goals

    Implement and refactor the movie portrait and landscape list in home and movie list screen for new v2 design.

    It also contains some enhancement for this project:

    • Upgrade libraries version.
    • Migrate koin to v3.
    • Use coil for image loading.

    v1 Old Design

    v2 New Design

    feature 
    opened by enginebai 0
  • Publish on F-Droid

    Publish on F-Droid

    It would be great if MovieHunt could be published on F-Droid.

    There's an FAQ with all relevant questions.

    It only works if all components are free, though. And I guess it would require to have the API key configurable in the GUI, right? Since the key wouldn't be delivered directly.

    Thank you for MovieHunt! :raised_hands:

    enhancement 
    opened by alexanderadam 0
  • Watchlists/history sync with trakt.v

    Watchlists/history sync with trakt.v

    MovieHunt looks great! :star_struck:

    It's basically the standard platform to sync a movie collection, what was already seen, what's on the watchlist etc.

    Integration/sync with the watchlist/history of Netflix would be great as well, but I don't think that they have an open API. :wink:

    enhancement 
    opened by alexanderadam 0
  • Jetpack Compose decompose components

    Jetpack Compose decompose components

    Home

    • [x] Title
    • [x] See All button
    • [ ] Carousel item
      • [ ] Rating (total count) where raating could be one or five star(s), and total count is optional.

    • [x] Portrait item
      • [ ] Load more progress

    • [x] Landscape item
      • [ ] Runtime

    List

    • [ ] Load more progress

    Detail

    • [x] Trailer item

    • [x] Review item

    • [x] Cast item

    Reviews

    • [x] Review item

    feature 
    opened by enginebai 0
  • Technical improvement

    Technical improvement

    Implement in the following order.

    New Frameworks or Libraries

    ---- After Jetpack Compose ----

    ---- 2022 ----

    • [ ] Flow
    • [ ] Paging 3
    • [ ] Static code analysis + Pre-commit
    • [ ] CI/CD: Jenkins / Travis / GitHub Action
    • [ ] App Bundle
    • [ ] Google Play Publish

    Enhancement

    New Stuffs

    • [ ] New Fragment API
    • [ ] Architecture: MVI, MVVM, Clean, VIPER
    • [ ] ViewBinding
    • [ ] DataStore
    enhancement feature refactor 
    opened by enginebai 0
Releases(v2.0.0)
  • v2.0.0(Nov 13, 2021)

    Features

    • New home layout
    • New movie list layout
    • New movie detail
    • Add review list

    Refactor

    • Migrate koin to v3
    • Upgrade the dependencies.
    • Migrate from Glide to Coil.
    Source code(tar.gz)
    Source code(zip)
  • v1.1.0(Sep 11, 2021)

  • v1.0.0(Jul 20, 2020)

    Features

    • Home page with now playing, popular, top rated, and upcoming category.
    • Movie list to view all movies from home category.
    • Movie detail to show the whole movie information.
    Source code(tar.gz)
    Source code(zip)
Owner
Engine Bai
Developer, Athlete, Learner.
Engine Bai
A movie application where you can search a movie that you want and see the detail of movie

MovieApp This is a simple movie application where you can search a movie that you want and see the detail of movie Technologies Hilt (Dependency Injec

Serhad Mert 5 Nov 30, 2021
Movie discovery app showcasing MVP, RxJava, Dagger 2 and Clean Architecture

MovieGuide ?? Refactoring in progress ??‍♀️ ⛏ ?? ??️ ?? ?? ?? Comments and new issues are welcome. ?? Currently not accepting external PRs that touch

Arun Sasidharan 2.6k Dec 25, 2022
(Coroutine, Flow(+StateFlow), Hilt, JetPack, MVVM, Repository Pattern, Retrofit2 & OkHttp3, Moshi, Glide, Timber, Material-Components)

(Coroutine, Flow(+StateFlow), Hilt, JetPack, MVVM, Repository Pattern, Retrofit2 & OkHttp3, Moshi, Glide, Timber, Material-Components)

ν›ˆμ„± 2 Nov 15, 2022
The JeTrivia is built on a modern Android Development tech stack with MVVM architecture. Kotlin, Coroutine, Flow, StateFlow, Jetpack Compose, Navigation, Room, Hilt, Retrofit2, OkHttp3, kotlinx.serialization, MockK, Truth

JeTrivia ?? In Progress ?? The JeTrivia application is sample based on MVVM architecture. Fetching data from the network via repository pattern and sa

Tolga Bolatcan 5 Mar 31, 2022
Shreyas Patil 2.1k Dec 30, 2022
Movie application created with TMDB API, Architecture Components, Android Jetpack libraries

MovieApp Movie application created with TMDB API, Architecture Components, Android Jetpack libraries Built With ??️ β€’ Kotlin - The language used in th

Ahmet Tufan 5 Sep 29, 2022
Movie Info - MovieInfo app that recieves popular movies and allow the user to search for specific movie through the restapi

Movie_Info MovieInfo app that recieves popular movies and allow the user to sear

inderjeet yadav 3 Jun 8, 2022
πŸ›’A Minimal Expense E-Commerce App built to demonstrate the use of modern android architecture components [Navigation, Room, MotionLayout, etc..] with MVVM Architecture. βœ”

E-Store A Simple E-Commerce App ?? built to demonstrate the use of modern android architecture component with MVVM Architecture ?? . Made with love ❀️

Ameen Essa 14 Nov 3, 2022
πŸ“š Sample Android Components Architecture on a modular word focused on the scalability, testability and maintainability written in Kotlin, following best practices using Jetpack.

Android Components Architecture in a Modular Word Android Components Architecture in a Modular Word is a sample project that presents modern, 2020 app

Madalin Valceleanu 2.3k Jan 3, 2023
Movo (Movie Information) is an android application to find out all the Movie Information and Details.

Movo About The Project Screen.Recording.2022-08-12.at.08.53.46_1.mp4 Movo (Movie Information) is an android application to find out all the Movie Info

Reihan Fatilla 4 Sep 28, 2022
Tv-Movie - Android application Tv&Movie that uses TMDB API

Tv&Movie This is an android application that shows lists of popular movies, popu

Tatiana Samoilenko 3 Aug 25, 2022
Android Clean Architecture Kick Start project with MVVM, Coroutine, DI, Caching, Networking.

Android Clean Architecture Kick Start project with MVVM, Coroutine, DI, Caching, Networking Stacks: Clean Architecture MVVVM Local Caching (StoreX) Ne

Romman Sabbir 3 Jun 18, 2022
An android app built using Kotlin that consumes TMDB API to display current trending, upcoming and popular movies 🍿 .

Flick An android app built using Kotlin that consumes TMDB API to display current trending, upcoming and popular movies ?? .It has been built followin

Kagiri Charles 8 Nov 29, 2022
🎬 A demo project for The Movie DB based on Kotlin MVVM architecture and material design & animations.

TheMovies A simple project for The Movie DB based on Kotlin MVVM clean architecture and material design & animations. How to build on your environment

Jaewoong Eum 420 Nov 29, 2022
🎬 A demo project using The Movie DB based on Kotlin MVVM architecture and material design & animations.

TheMovies2 A simple project using The Movie DB based on Kotlin MVVM architecture and material designs & animations. How to build on your environment A

Jaewoong Eum 450 Jan 2, 2023
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

Javokhir Jambulov 3 Aug 1, 2022
MVVM Movie App with Jetpack Compose (MovplayV2)

Movplay V2 This is the version 2 of An Android app built with Jetpack Compose consuming TMDB API to help users to have current information of the tren

Aldi Kitta 4 Nov 9, 2022
A reliable android app that shows upcoming fixtures, updated league tables, and top goal scorers in a Premier League and French Ligue 1

RapidScore Screenshots Table of Contents Description Dependencies API Reference Lessons Learnt Contributing Roadmap Google Playstore License Author In

Breens Mbaka 12 Jul 7, 2022
MovieApp - Movie App using Clean Architecture with MVVM architectural pattern

MovieApp In this project, MovieDB API has been used to retrive movie data. Upcom

Cansu Aktaş 2 Jun 17, 2022