Best android open-source packages and libraries.

FlightScheduler

Flight & Hotel scheduler using Amadeus REST services
Updated 3 months ago

Flight Scheduler ✈️

Table of Contents

Technologies Used 🛠

  • Kotlin - First class and official programming language for Android development.
  • Coroutines - For asynchronous and more..
  • Jetpack Compose - Android’s modern toolkit for building native UI.
  • Android Architecture Components - Collection of libraries that help you design robust, testable, and maintainable apps.
    • LiveData - Data objects that notify views when the underlying database changes.
    • ViewModel - Stores UI-related data that isn't destroyed on UI changes.
    • ViewBinding - Generates a binding class for each XML layout file present in that module and allows you to more easily write code that interacts with views.
    • Room - SQLite object mapping library.
  • Dependency Injection -
    • Hilt-Dagger - Standard library to incorporate Dagger dependency injection into an Android application.
    • Hilt-ViewModel - DI for injecting ViewModel.
  • Glide - A type-safe HTTP client for Android and Java.
  • Moshi - A modern JSON library for Kotlin and Java.
  • Moshi Converter - A Converter which uses Moshi for serialization to and from JSON.
  • Material Components for Android - Modular and customizable Material Design UI components for Android.

Features

  • Search Flight and Hotel offers on global scope.
  • Display itinerary price metrics regarding the previous flight dates.
  • Check the status of the ongoing flight.
  • Display Seat Maps of the flights.
  • Get the delay prediction of the upcoming flights.

Package Structure

com.java.flightscheduler    # Root Package
.
├── data                # For data handling.
│   ├── local           # Local Persistence Database. Room (SQLite) database
|   │   ├── dao         # Data Access Object for Room   
│   ├── remote          # Remote Data Handlers     
|   │   ├── api         # Retrofit API for remote end point.
│   └── repository      # Single source of data.
|
├── model               # Model classes
|
├── di                  # Dependency Injection             
│   ├── builder         # Activity Builder
│   ├── component       # DI Components       
│   └── module          # DI Modules
|
├── ui                  # Activity/View layer
│   ├── base            # Base View
│   ├── main            # Main Screen Activity & ViewModel
|   │   ├── adapter     # Adapter for RecyclerView
|   │   └── viewmodel   # ViewHolder for RecyclerView   
│   └── prediction      # Delay Prediction of Flights
|   │   ├── search      # Prediction search component
|   │   └── results     # Prediction results component
│   └── flight          # Flight offers and it's details
|   │   ├── search      # Flight search component
|   │   ├── results     # Flight results component
|   │   └── details     # Flight details component
│   └── hotel           # Hotel offers and it's details
|   │   ├── search      # Hotel search component
|   │   ├── results     # Hotel results component
|   │   └── details     # Hotel details component
│   └── seatmap         # Seatmap
|      └── results      # Seatmap results
|
└── utils               # Utility Classes / Kotlin extensions

Setup

In order to run project on local, APP_SECRET AND APP_KEY required. Please check https://developers.amadeus.com for more information Retrieved KEY files should be stored in gradle.properties file

API_KEY = "YOUR_API_KEY"
API_SECRET = "YOUR_API_SECRET"

All test cases are located in androidTest package, during the test implementation, dependency injection is being handled by Hilt In order to run test cases, Virtual device (Emulator) or Physical device needs to be connected.

  • Network tests are located in here
  • UI tests are located in here
  • Apk file can be located in here

Architecture

This app uses MVVM (Model View View-Model) architecture.

TODO

  • Preferences option
  • Itinerary metrics visualisation
Tags rest