Farmz
A simple android application to fetch, update farmers and register their farms Fully compatible with Android 11, supporting light and dark theme (see screenshots)
API Key
The app uses google maps to display location of farms. Get an api key here
- Create the file
secure.properties
in your project level directory, and then add the following code to the file. ReplaceYOUR_API_KEY
with your API key.
MAPS_API_KEY=YOUR_API_KEY
- Place it in
app/build.gradle
android {
defaultConfig {
...
def secureProps = new Properties()
if (file("../secure.properties").exists()) {
file("../secure.properties")?.withInputStream { secureProps.load(it) }
}
resValue "string", "maps_api_key", (secureProps.getProperty("MAPS_API_KEY") ?: "")
...
}
...
}
Download APK
You can download the APK from releases
Use email a@b.c
and password 123456
to log in. The app was tested on only Android 10 for now
What you can learn
- Material Components
- Constraint Layout
- Retrofit for REST api communication
- Glide for image loading
- Mockk for mocking in tests
- Dagger2 for dependency injection
- Room for database
- Kotlin Flow for concurrency
- ViewModel & LiveData
- Navigation Architecture Component
- Clean Architecture
- ViewBinding
- Kotlin Delegates
- DataStore
- Paging 3.0
- Google Maps
- Activity Results API
Unit Tests
Some unit tests are under the app/src/test
and app/src/androidTest
directories, to run them, click the test package and right click and select Run all tests in...
Possible Improvements
- Add logout funtionality
- Change theme
- Improve pagination
- Use multiple back stacks on bottom navigation
- Improve maps experience
- Delete added farms
- Improve UI/UX