Hechio / Mziike-Trailers

This an android app that shows movies and TV Shows trailers - kyosk assigment

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Mziike Trailers

You can change the api key if daily requests are exceeded. i.e 100 requests for the this free plan const val API_KEY = "" in AppConstants

Table of Contents

Prerequisite

This project uses the Gradle build system. To build this project, use the fastlane debug_build gradlew build command after cloning or use "Import Project" in Android Studio.

The App

A small app that loads and presents a list of movies and TV Shows from IMDB API. The app has two Activity namely MainActivity and SearchActivity. MainActivity acts as entry point with a bottom navigation which hold three fragmnents; HolderFragment, ProfileFragment and TvFragment. HolderFragment, provides a parent fragment manager to HomeMoviesFragment which show list of movies TV Shows, ShowAllFragmnets that show all movies under a category and DetailsFragment that show more details about a single movie or tv show item. SearchActivity is used to search movies or tv shows

The project has been written in Kotlin language. For network requests, it uses Retrofit with RxJava and Coroutines.

Dagger Hilt has been used for Dependency injection.

Architecture

The project is built using the MVVM architectural pattern and make heavy use of a couple of Android Jetpack components. Mvvm allows for the separation of concern which also makes testing easier.

MVVM implementation

The first time the app is opened, the data will be fetched from the backend api service and stored locally with the help of Room database. But if there is no internet or the api service is down, the data will be fetched from the local cache. This is handled in the repository class. ViewModel is basically responsible for updating the UI (Activity/Fragment) with the data changes. The ViewModel will initialise an instance of the Repository class and update the UI based with this data.

Testing

All tests are under the Android Test package. All the tests are run using JUnit. To run tests using fastlane run gradlew build command in your CL. Test automation have also been achieved using CircleCi.

ScreenShots

The app is available in both day and night theme.





Libraries used in the whole application are:

  • Viewmodel - Manage UI related data in a lifecycle conscious way

  • RxJava - RxJava is a Java VM implementation of Reactive Extensions: a library for composing asynchronous and event-based programs by using observable sequences.

  • Kotlin.coroutines - Concurrency design pattern that you can use on Android to simplify code that executes asynchronously.

  • Dagger Hilt - Used for Dependency injection

    • To simplify Dagger-related infrastructure for Android apps.
    • To create a standard set of components and scopes to ease setup, readability/understanding, and code sharing between apps.
    • To provide an easy way to provision different bindings to various build types (e.g. testing, debug, or release).
  • Retrofit - Turns your HTTP API into a Java interface.

  • Fastlane - Automate beta deployments and releases for Android apps. 🚀

  • Mockito - Enables mock creation, verification and stubbing for testing

  • CircleCi - Achieving continuous integration

  • MockWebServer - A scriptable web server for testing HTTP clients Kotlin coroutines

Sample App and Source Code

Clone the project and run fastlane debug_build in terminal to generate app

Source.Code - Access to the project's github reporitory

About

This an android app that shows movies and TV Shows trailers - kyosk assigment


Languages

Language:Kotlin 99.1%Language:Ruby 0.9%