Giter Club home page Giter Club logo

spotify-test-project's Introduction

Spotify Test Project

This project created base on VOI Technology assignment for hiring process.

It is base on Kotlin and Spotify webService with most the new Android architecture components and another useful library on android such as

  • viewModel
  • liveData
  • Retrofit
  • Dagger 2
  • data Binding
  • MVVM
  • Room
  • Kotlin Coroutines
  • Glide
  • androidTest with espresso and mock

Description

  • SplashActivity is the launcher activity.It's just contains of Kotlin Coroutines for start another activity.

  • MainActivity : It's contains paging list RecyclerView which just show vertical list of

    • MainActivityViewModel viewModel of MainActivity, handle Data Request and action. Request to DataSource.Factory is based on changing query.
    • MainDataSourceFactory DataSource Factory for Handle PageKeyedDataSource data request.
    • PageKeyedDataSource handle request by paging parameters offset and pageSize. I've implemented Room but It's not connected to this part.
    • BoundaryCallback is not implemented because we just fetch data from network but if we're going to add Room in the process that would be necessarily too.
  • ListWithoutPaging : It' contains vertical RecyclerView and in the RecyclerView I've implemented horizontal RecyclerView and that's contains Artist, Album, Playlist and Track.

    • ListWithoutPagingViewModel : viewModel of ListWithoutPaging, handle Data Request and action. Request to DataSource.Factory is based on changing query.
    • DataRepository implemented for Handle request data.
  • BaseApp is Application class and the link between Kotlin with JNI. I've two String parameters in JNI for clientId and ClientSecret.

  • RestRequest is main Interface of Retrofit and It can handle development and test mode. in this part we have 2 webService getAccessToken for request token Oath2 form server and searchArtist for get list data. All the class related to Retrofit is in api package.

  • BindingAdapter class used for custom attribute we need for dataBinding.

  • SpotifyDb is Room database for save Artist list data, ArtistDao is contains query should be run on database. and for saving Image object in database I used DataConvertor class to change the format from object to Json and Json to images.

  • BaseActivity is a general class and all activities extends from it. Dagger is in this class and it also had some useful module.

  • AppExecuter is responsible for execute all task in the project on Network, IO and Main Thread.

  • LogHelper is a class for writing all Log in the hole project.

  • Test Class

    • androidTest - webServiceTest for mocking web Service and test result.(It need to be complete) - ArtistDaoTest for test database and Artist Table. - ListPageInstrumentedTest for test ListWithoutPaging and adapter.

Prerequisites

- Android Studio 3.3.2
- Gradle version 4.10.1+
- Kotlin 1.3.21

Author

Ali Shatergholi

spotify-test-project's People

Stargazers

Roman avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.