Currency Converter is an offline-first Android Application that allows the user to view a given amount in a given currency converted into other currencies. The App fetches the data from Open Exchange Rates API and uses Room for offline caching. It fetches just the conversion rates from the API and performs the conversion logic for the user. The App has a Splash Screen and a home page which initially displays the rates of all available Currencies. A user can input any desired amount and select any currency from the list after which the App converts the figure into other currencies and displays the different amounts to the user. To limit bandwidth usage, the App has 3 different implementations of how to update the local database with remote data periodically (every 30 minutes). These are in separate branches;
It is implemented using Clean Architecture, Model-View-ViewModel (MVVM) pattern and uses Modern Android Development pattern and libraries. Adequate Unit Tests were also implemented in the codebase.
This application has the following characteristics:
- 100% Kotlin
- Modern Architecture (Clean Architecture, Model-View-ViewModel (MVVM))
- Android Jetpack Components
- Material Design
Minimum API level is set to 21, this means HolidayInfo can run on approximately 98% of Android devices
- Splash Screen, the standard recommended Splash Screen library for Android Applications
- Retrofit which is a type-safe REST client for Android which makes it easier to consume RESTful web services
- Moshi, a modern JSON library for Android, Java and Kotlin
- OkHttp Logging Interceptor, an OkHttp interceptor which logs HTTP request and response data
- Kotlin Coroutines used to perform asynchronous network calls to the remote server
- Room, a persistence library with an abstraction layer over SQLite for database manipulation
- Hilt, a DI library for Android that reduces the boilerplate of using manual DI
- WorkManager, the recommended library for persistent (periodic or repetitive) work
- App Startup, which provides a straightforward, performant way to initialize components at application startup
- ViewModel used to store and manage UI-related data in a lifecycle conscious way
- LiveData which is an observable data holder class used to handle data in a lifecycle-aware manner
- View Binding used to easily write code that interacts with views by referencing them directly
- Kotlin flow for emitting live updates from a network call sequentially
- Material Design which is an adaptable system that guides in maintaining principles and best practices of contemporary UI
- Timber, a utility library for logging and easy debugging
- SearchableSpinner, a dialog spinner with a search feature which allows users to search the items loaded in the spinner
- SDP/SSP which is a scalable size unit that scales with the screen size. It helps to easily design for multiple screens
- JUnit4, a testing framework used for writing unit tests
- MockWebServer, a library that makes it easy to test how Apps behave when making HTTP/HTTPS calls
- Mockito, a mocking framework for writing unit tests
You will need an App ID from Open Exchange Rates API. In your project's root directory, inside the local.properties
file, include the following line:
app.id=YOUR_APP_ID