This is a sample app that simulates real time data plotting. It fetches data from a Fake Json Server every two seconds and plot the returned values on line charts. There are two implementations of the app, one written in Kotlin, and the other in Java, but the behavior of the app is the same.
- The three line charts shown in the app plots the actual values returned from the Server with the blue lines & randomly scales these values (bounded by the min & max values for each chart type) and plots them for KPI simulation only in the green and red lines.
- The bar chart shown at the end of the home screen shows different gradient background colors for the 3 values (RSRP, RSRQ and SINR) based on the signal strength (green refers to excellent signal, yellow good signal, orange fair signal, and red poor signal).
- When the app is put on the background (by pressing the home button) data fetching is stopped (to preserve battery & CPU) and when the app is put back to the foreground the data fetching is resumed again.
- RSRP y values range from -140 to -60, RSRQ y values range from -30 to 0, and SINR from -10 to 30.
- Line charts support zooming, draging, point highlighting, etc.
- RSRP (excellent: value >= -80, good: -80 > value >= -90, fair: -90 > value > -100, poor: value <= -100).
- RSRQ (excellent: value >= -10, good: -10 > value >= -15, fair: -15 > value > -20, poor: value <= -20).
- SINR (excellent: value >= 20, good: 20 > value >= 13, fair: 13 > value > 0, poor: value <= 0).
This sample app uses MVVM Architecture, a well known architecture for Android, the app's components are less dependents and easier to test.
- Dagger 2 for dependency injection
- Retrofit for REST api communication
- Gson for parsing JSON
- ButterKnife for view binding
- MPAndroidChart for charts