Development Blog Week 2 – Cloud Functions
For this week we focused on integrating Firebase with our Android app.
We aimed to achieve the following:
- Set up Firebase with our app
- Develop some back-end logic in Firebase that would communicate with our app
We found it tricky to get started with actually connecting Firebase to our app and have the cloud based functions communicate with the app. Most of the online documentation was about Firebase’s database module.
After some experimentation we were able to connect a simple mathematical function from the cloud back-end to our app. We expanded on this to develop our first working piece of logic. This function pulled information from the external ADS-B exchange API (the API we use for getting aircraft details), and sent it to the app where it could be parsed to get the longitude and latitude of aircraft within a specified range.
While this was being implemented we introduced some unit tests to our project. We used JUnit v4 as it was the recommended unit testing framework for Android. We also made some small UI improvements such as enhanced menu options.
With the Firebase cloud functions working we were able to have some functionality in our app – it now has some semblance of our vision of the completed app with markers plotting the locations of aircraft, and the ability to tap on markers to get more details.
Next week we aim to update the UI to be more user friendly, and begin design of the app’s AR module.