Skip to content

An app that displays foodtrucks from StreetFoodApp.com by using Android Architecture Components

Notifications You must be signed in to change notification settings

ArturoKuang/FoodTrck

Repository files navigation

FoodTrck

About

An app that gets a list of foodtrucks from StreetFoodApp.com API , and displays them conveniently. The user can also choose to see markers of nearby foodtrucks.

Installation

Clone this repository and import into Android Studio

git clone https://github.com/axk4647/FoodTrck.git

Prerequisites

To build the project successfully you will need to create a apikey.properties file and include the following lines with your MAPS SDK for Android API KEY

GOOGLE_MAPS_API_KEY=XXXXXXXXXXXXXXXXXXXXX_XXXXXXXXXXXXXXXXX

Overview

  • Gradle Kotlin is used setting up gradle files with buildSrc folder and extensions.
  • Hilt for dependency injection
  • Android architecture components to manage lifecycles
  • Coroutines and flow to manage asynchronous programming
  • Repository provides offline and remote data sources via retrofit and room
  • Adheres to MVVM architectural patterns

Libraries

  • Kotlin - First class and official programming language for Android development.

  • Coroutines - Lightweight asynchronous mechanism

  • Flow - A cold asynchronous data stream that sequentially emits values and completes normally or with an exception.

  • Android JetPack - 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.
    • DataBinding - 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.
    • SavedStateHandle A handle to saved state passed down to androidx.lifecycle.ViewModel. You should use SavedStateViewModelFactory if you want to receive this object in ViewModel's constructor.
    • Room Persistence library provides an abstraction layer over SQLite to allow for more robust database access while harnessing the full power of SQLite.
  • Material Components for Android - Modular and customizable Material Design UI components for Android.

  • Dependency Injection -

    • Hilt - Standard library to incorporate Dagger dependency injection into an Android application.
    • Hilt-ViewModel - DI for injecting ViewModel.
  • Retrofit - A type-safe HTTP client for Android and Java.

  • Glide - Image loading library.

  • Espresso - Android UI Tests

  • JUnit - Unit testing

  • Mockito - Mocking framework

APIS

Street Food API

Google maps

Architecture

Icon sources:

Illustration Vectors by Vecteezy

Material Design Icons