Android app interfacing with currencyLayer API to get exchange rates for various currencies.
The app was developed in Kotlin (Android) and covers al the tasks I set out to deliver on.
-
API properties (keys, endpoint, base urls) are defined in the file apikey.properties. The file also contains all necessary attributes for the running of the app
-
The file - keystore.properties holds the information for building a release build for the app. You may need to adjust these to your settings when necessary
-
The app has an integration to Firebase (Crashlytics, Analytics, Events)
-
currencyLayer API limits the endpoint(live) to one currency (USD)
The tests are in the respective test folders.
I have written a test case for the Conversions.
However, there seems to be an issue with the WorkfManagerTest and ConvertDBTest files. This is related to the gradle plugin not pulling in properly.
- WorkManager for Managing the scheduled retrieval on rates
- RoomDB for persisting the currencyLayer API information
- ViewModel for accessing the Room DB objects
- DiffUtils for RecyclerView updates
- Run the app to a device or emulator
- The list of currencies will be loaded into the CURRENCY box.
- The deault currency rate is 1 (1:1)
- Select any currency and the app will refrech the list to show the rates for the selected currency
- The app will also attempt to retrieve the rate from the API when 4 is selected and will use the room db observe pattern to refresh the list