Skip to content

A simple android application to fetch, update farmers and register their farms

License

Notifications You must be signed in to change notification settings

KryptKode/Farmz

Repository files navigation

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. Replace YOUR_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

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...

Run tests screenshot

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

Screenshots

Dark

Screenshot

Light

Screenshot

Lines of code

Lines of code