Skip to content

manasa-murali/MeasureDistance

Repository files navigation

MeasureDistance


This is an Android Project which fetches Customer Information and filters those residing within 100 km.

The filtered result is displayed as a List (Recycler View) when the app is launched. Also, the sample output of the result is stored as output.txt file under output directory


Steps to install

This project can be opened in Android Studio
Use

git clone https://github.com/manasa-murali/MeasureDistance.git

in your terminal, and launch this project in Android Studio

The entry point to this project is FilterFragment.kt

This code base follows MVVM architecture, hence, the View(FilterFragment) asks the ViewModel to perform filter operation through filterData() method in the view model.
The businuess logic or the computation is isolated and happens in the ViewModel
The given customer data is fetched using OkHttp Library
When the filtering is complete , the View listens for the changeset from the viewmodel and updates the UI.

Running Tests

DistanceViewModelTest.kt contains the tests for the business logic.
1. After navigating to this file in Android Studio, you can click on the icon to the left side of the class name, and select Run DistanceViewModelTest or
2. Go to src/test/java/com.example.measuredistance.viewmodel package in your Project View from Dropdown and right click on this package to select, Run Tests in 'viewmodel'

Output

List of Customers residing within 100 km from the given location, sorted by their userID

Filtered Result

About

No description or website provided.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages