Summary of the Article
Have a project in mind?Schedule a Call
Google releases source code for I/O app 2018
Reading Time: 2 minutes
Summary of the Article
It has become a tradition for Google to release the source code of I/O event Android app after several weeks of the event.
This annual release is done to demonstrate best practices for app development. Developers can take a look at the code to get a better understanding of Google’s best practices for Android App Development.
Google’s I/O 2018 app represents a complete rewrite of the application. The app has moved from ContentProvider+SyncAdapter architecture to Architecture Components.
It’s Google’s Android Team current recommendation for developing modern apps for Android. Google has used Kotlin for the rewrite of the application.
Here is the general overview of the app’s architecture –
Repository layer is used for handling data operations. Data comes from different data sources –
- User Data is stored in Cloud Firestore (either remotely or in the local cache)
- User settings and preferences are stored in SharedPreferences
- Conference Data is stored remotely and is fetched and stored in the memory
Repository modules are responsible for handling all the data operations.
Dagger2 is used for dependency injection.
Espresso is used for basic instrumentation tests and JUnit and Mockito for unit testing.
The Firebase platform has now matured and the use of Firebase technologies has now increased. Following are the Firebase components used in I/O 2018 –
Firebase Cloud Firestore
It is Google’s source for all user data
Firebase Cloud Functions
Firebase Cloud Functions are used to run the backend code. The reservation function, checking user’s status, checking space availability all depends upon on Cloud Functions.
Firebase Cloud Messaging
Cloud Messaging is used to inform the app about any sort of changes in conference data using a ping-and-fetch model.
Firebase Remote Config
Remote Config is used to inform users about WiFi information, conference schedule, etc in a lightweight manner.
Google made the choice of rewriting the app from scratch in Koltin to bring the modern Android architecture. Using Kotlin for the rewrite is an easy choice because –
- Kotlin’s syntax is expressive, concise, and powerful
- Support for safety features including nullability and immutability
- Enhanced Functionality using Android Ktx extensions
At I/O 2018, The Material Design team announced Material Theming which give apps the ability to customize Material Design to bring more personalization of their product’s brand.
As the app was released before Material Theming, so they could not use all of the new components but managed to sneak a few including a new Bottom App Bar with inset Floating Action Button.
The app is available for developers on Github.