Latest news about Bitcoin and all cryptocurrencies. Your daily crypto news habit.
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.
App Architecture
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 the Google’s Android Team current recommendation for the 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.
Firebase
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 the Google’s source for all user data
FIREBASE CLOUD FUNCTIONS
Firebase Cloud Functions are used to run 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 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.
Kotlin
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
Material Theming
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.
Learn more on our Website — VT Netzwelt
Google Releases Source Code For I/O App 2018 was originally published in Hacker Noon on Medium, where people are continuing the conversation by highlighting and responding to this story.
Disclaimer
The views and opinions expressed in this article are solely those of the authors and do not reflect the views of Bitcoin Insider. Every investment and trading move involves risk - this is especially true for cryptocurrencies given their volatility. We strongly advise our readers to conduct their own research when making a decision.