Skip to content
This repository was archived by the owner on Jan 5, 2023. It is now read-only.

Commit 4eff725

Browse files
JoseAlcerrecaGerrit Code Review
authored andcommitted
Merge "Udpates the README" into main
2 parents 36f30ad + c09dcc9 commit 4eff725

File tree

1 file changed

+57
-55
lines changed

1 file changed

+57
-55
lines changed

README.md

Lines changed: 57 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,33 @@ Google I/O Android App
22
======================
33
[![Build Status](https://travis-ci.org/google/iosched.svg?branch=master)](https://travis-ci.org/google/iosched)
44

5-
**Due to global events, Google I/O 2020 was canceled and thus an Android app
6-
update was not released to Google Play. However, prior to the cancellation, the
7-
team implemented several architecture improvements, reflected in the code
8-
published in June, 2020. The general look and feel of the app is unchanged, and
9-
the app still uses the data from Google I/O 2019.**
10-
5+
# 2021 Update
6+
7+
**Due to global events, Google I/O 2020 was canceled and Google I/O 2021 is an online-only event, so
8+
the companion app hasn't been updated since 2019. However, the `iosched` team has continued
9+
adding several architecture improvements to its codebase.
10+
The general look and feel of the app is unchanged, and the app
11+
still uses the data from Google I/O 2019.**
12+
13+
Major improvements implemented in 2021:
14+
* Migration from LiveData to Kotlin Flows to observe data.
15+
* Support for large screens and other form factors.
16+
* Migration from SharedPreferences to [Jetpack DataStore](https://developer.android.com/topic/libraries/architecture/datastore).
17+
* (Experimental) Partial migration to Jetpack Compose
18+
(in the [`compose`](https://github.com/google/iosched/tree/compose) branch)
19+
20+
# Description
1121
Google I/O is a developer conference with several days of deep
1222
technical content featuring technical sessions and hundreds of demonstrations
1323
from developers showcasing their technologies.
1424

1525
This project is the Android app for the conference.
1626

17-
For a simpler fork of the app, check out the [Android Dev Summit App in the adssched branch](https://github.com/google/iosched/tree/adssched). In this variant some features are removed, such as reservations and the map screen, and Instant App support is added.
27+
# Running the app
28+
29+
The project contains a `staging` variant that replaces some modules at compile time so they
30+
don't depend on remote services such as Firebase. This allows you to try out and test the app
31+
without the API keys.
1832

1933
# Features
2034

@@ -37,58 +51,51 @@ during the conference in Home.
3751
The app is written entirely in Kotlin and uses the Gradle build system.
3852

3953
To build the app, use the `gradlew build` command or use "Import Project" in
40-
Android Studio. A canary or stable version of Android Studio 4.0 or newer is
41-
required and may be downloaded
42-
[here](https://developer.android.com/studio/).
54+
Android Studio. Android Studio Arctic Fox or newer is required and may be downloaded
55+
[here](https://developer.android.com/studio/preview).
4356

4457
# Architecture
4558

4659
The architecture is built around
47-
[Android Architecture Components](https://developer.android.com/topic/libraries/architecture/).
48-
49-
We followed the recommendations laid out in the
50-
[Guide to App Architecture](https://developer.android.com/jetpack/docs/guide)
51-
when deciding on the architecture for the app. We kept logic away from
52-
Activities and Fragments and moved it to
60+
[Android Architecture Components](https://developer.android.com/topic/libraries/architecture/)
61+
and follows the recommendations laid out in the
62+
[Guide to App Architecture](https://developer.android.com/jetpack/docs/guide). Logic is kept away
63+
from Activities and Fragments and moved to
5364
[ViewModel](https://developer.android.com/topic/libraries/architecture/viewmodel)s.
54-
We observed data using
55-
[LiveData](https://developer.android.com/topic/libraries/architecture/livedata)
56-
and used the [Data Binding Library](https://developer.android.com/topic/libraries/data-binding/)
57-
to bind UI components in layouts to the app's data sources.
65+
Data is observed using
66+
[Kotlin Flows](https://developer.android.com/kotlin/flow/stateflow-and-sharedflow)
67+
and the [Data Binding Library](https://developer.android.com/topic/libraries/data-binding/)
68+
binds UI components in layouts to the app's data sources.
5869

59-
We used a Repository layer for handling data operations. IOSched's data comes
70+
The Repository layer handles data operations. IOSched's data comes
6071
from a few different sources - user data is stored in
6172
[Cloud Firestore](https://firebase.google.com/docs/firestore/)
6273
(either remotely or in
6374
a local cache for offline use), user preferences and settings are stored in
6475
DataStore, conference data is stored remotely and is fetched and stored
6576
in memory for the app to use, etc. - and the repository modules
6677
are responsible for handling all data operations and abstracting the data sources
67-
from the rest of the app (we liked using Firestore, but if we wanted to swap it
68-
out for a different data source in the future, our architecture allows us to do
69-
so in a clean way).
78+
from the rest of the app.
7079

71-
We implemented a lightweight domain layer, which sits between the data layer
80+
A lightweight domain layer sits between the data layer
7281
and the presentation layer, and handles discrete pieces of business logic off
7382
the UI thread. See the `.\*UseCase.kt` files under `shared/domain` for
7483
[examples](https://github.com/google/iosched/search?q=UseCase&unscoped_q=UseCase).
7584

76-
We used [Navigation component](https://developer.android.com/guide/navigation)
77-
to simplify into a single Activity app.
85+
The [Navigation component](https://developer.android.com/guide/navigation) is used
86+
to implement navigation in the app, handling Fragment transactions and providing a consistent
87+
user experience.
7888

79-
We used [Room](https://developer.android.com/jetpack/androidx/releases/room)
89+
[Room](https://developer.android.com/jetpack/androidx/releases/room) is used
8090
for Full Text Search using [Fts4](https://developer.android.com/reference/androidx/room/Fts4)
8191
to search for a session, speaker, or codelab.
8292

83-
We used [Espresso](https://developer.android.com/training/testing/espresso/)
84-
for basic instrumentation tests and JUnit and
85-
[Mockito](https://github.com/mockito/mockito) for unit testing.
93+
UI tests are written with [Espresso](https://developer.android.com/training/testing/espresso/)
94+
and unit tests use Junit4 with
95+
[Mockito](https://github.com/mockito/mockito) when necessary.
8696

87-
For 2020, we added several Jetpack libraries:
88-
89-
- We added the
90-
[Jetpack Benchmark library](https://developer.android.com/studio/profile/benchmark).
91-
The Benchmark library makes it easy to benchmark your code from within Android Studio.
97+
The [Jetpack Benchmark library](https://developer.android.com/studio/profile/benchmark)
98+
makes it easy to benchmark your code from within Android Studio.
9299
The library handles warmup, measures your code performance, and outputs benchmarking
93100
results to the Android Studio console. We added a few benchmark tests around
94101
critical paths during app startup - in particular, the parsing of the bootstrap
@@ -104,14 +111,12 @@ benchmark: 76,076,101 ns BootstrapConferenceDataSourceBenchmark.benchmark_jso
104111
Tests ran to completion.
105112
```
106113

107-
- We migrated from [dagger-android](https://google.github.io/dagger/android.html) to
108-
[Hilt](https://developer.android.com/training/dependency-injection/hilt-android)
109-
for dependency injection. This allowed us to remove 75% of the dependency
110-
injection code, and also resulted in a 13% build time improvement.
114+
Dependency Injection is implemented with
115+
[Hilt](https://developer.android.com/training/dependency-injection/hilt-android). For more details
116+
on migrating from *dagger-android* to Hilt, read the
117+
([migration article](https://medium.com/androiddevelopers/migrating-the-google-i-o-app-to-hilt-f3edf03affe5).
111118

112-
- We migrated to
113-
[ViewPager2](https://developer.android.com/training/animation/screen-slide-2)
114-
for our view paging needs. ViewPager2 offers enhanced functionality over the
119+
[ViewPager2](https://developer.android.com/training/animation/screen-slide-2) offers enhanced functionality over the
115120
original ViewPager library, such as right-to-left and vertical orientation support.
116121
For more details on migrating from ViewPager to ViewPager2, please see this
117122
[migration guide](https://developer.android.com/training/animation/vp2-migration).
@@ -120,7 +125,7 @@ For more details on migrating from ViewPager to ViewPager2, please see this
120125

121126
The app makes considerable use of the following Firebase components:
122127

123-
- [Cloud Firestore](https://firebase.google.com/docs/firestore/) is our source
128+
- [Cloud Firestore](https://firebase.google.com/docs/firestore/) is our source
124129
for all user data (events starred or reserved by a user). Firestore gave us
125130
automatic sync and also seamlessly managed offline functionality
126131
for us.
@@ -132,26 +137,23 @@ let us inform the app about changes to conference data on our server.
132137
- [Remote Config](https://firebase.google.com/docs/remote-config/) helped us
133138
manage in-app constants.
134139

135-
For 2020, we migrated to the Firebase Kotlin extension (KTX) libraries to
140+
For 2020, the implementation was migrated to the Firebase Kotlin extension (KTX) libraries to
136141
write more idiomatic Kotlin code when calling Firebase APIs. To learn more,
137142
read this
138143
[Firebase blog article](https://firebase.googleblog.com/2020/03/firebase-kotlin-ga.html)
139144
on the Firebase KTX libraries.
140145

141146
## Kotlin
142147

143-
We made an early decision to rewrite the app from scratch to bring it in line
144-
with our thinking about modern Android architecture. Using Kotlin for the
145-
rewrite was an easy choice: we liked Kotlin's expressive, concise, and
146-
powerful syntax; we found that Kotlin's support for safety features for
147-
nullability and immutability made our code more resilient; and we leveraged the
148-
enhanced functionality provided by
148+
The app is entirely written in Kotlin and uses Jetpack's
149149
[Android Ktx extensions](https://developer.android.com/kotlin/ktx).
150150

151-
For 2020, we migrated to
152-
[coroutines](https://developer.android.com/kotlin/coroutines)
153-
for asynchronous tasks. Coroutines is the recommended way to do asynchronous
154-
programming in Kotlin. We also migrated our build scripts to
151+
Asynchronous tasks are handled with
152+
[coroutines](https://developer.android.com/kotlin/coroutines). Coroutines allow for simple
153+
and safe management of one-shot operations as well as building and consuming streams of data using
154+
[Kotlin Flows](https://developer.android.com/kotlin/flow).
155+
156+
All build scripts are written with the
155157
[Kotlin DSL](https://docs.gradle.org/current/userguide/kotlin_dsl.html).
156158

157159
# Copyright

0 commit comments

Comments
 (0)