Coder Social home page Coder Social logo

movetracker's Introduction

Introduction

Notice!!

  1. Add your google-services.json under /app
  2. You might have issue about can't get GPS location via mock location on Emulator. Change Location Mode to High Accuracy in Settings should work.

Keywords in this implementation:

  1. ViewModel/LiveData/Room
  2. Kotlin/rxjava2
  3. Unit test - junit/mockito/robolectric
  4. Others 3rd-party API - retrofit2/picasso/renaudcerrato:static-maps-api

A. Architecture

Refer to the link if you can see the pic: https://drive.google.com/open?id=1M-OCdhPYnqwUkWvNlwUHRMYzI8snJn76 GitHub

B. Testing - junit/mockito/robolectric

  1. The data, domain, presentation layer are defined clearly. so we can get rid of complex dependencies between layers. You can also see this implementation are easy to test each layer separately.

  2. I wrote the TrackAdapterTest as example to show how we can test the class with Mock and Robolectric.

  3. For MainActivity and , we can mock it easily after replace the variable which in the MainActivity.inject() to Dagger Injection.

C. Others - retrofit2/picasso/renaudcerrato:static-maps-api

  1. Use 3rd-party library to handle http request, image cache loading and build static-maps URL easily.

D. Known Issue For More Improvement

  1. Replaced variables in MainActivity and LocationTrackingService by Dagger Injection for testing easier.

  2. Structure for keeping Locations is not efficient. Should be handled better

  3. LocationTrackingService should change the variables to inject way for easy testing.

  4. The other known issues were written in the code as comment.

movetracker's People

Stargazers

 avatar

Watchers

 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.