FlixBus Coding Task

Logo

Features

  • Fetch timetables from FlixBus service
  • Show fetched timetables in their respective timezones in a list
  • API module separated so that it can be used with any of the host app
  • Unit Tests written for Repos and View Models
  • R8 Enabled

Screenshots

Splash Fetched Timetables

Demo Video

Flixbus.Demo.mp4


Introduction

There are two major parts in the codebase, written in Kotlin

  • Android application
  • Android API

Dependencies and Libraries

  • Coroutine and Flow
  • Retrofit (networking)
  • GSON (json-parsing)
  • Koin (dependency injection)

Testing:

  • Mockito (mocking)
  • Turbine (flows)

Setup

  • Android Studio Arctic Fow (latest version preferably)
  • Kotlin 1.6.10 or newer in your project
  • Java 11 selected as your JDK
  • App’s minimum API level to 21

API Module Usage

The API module can be added with any host application as a stand-alone data source providing the
flixbus timetable’s data

// Get timetables
flixBusDataSourceSource.getTimetable( object : OnResult<TimetableResponse> {
    override fun getItem(response: TimetableResponse) {
        // do something
    }

})

GitHub

View Github