Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
This repository was archived by the owner on Jan 5, 2023. It is now read-only.
/ioschedPublic archive

The Google I/O Android App

License

NotificationsYou must be signed in to change notification settings

google/iosched

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

2023 Update

This repository has been archived. The Google I/O app has guided online and in-person visitors through the Google I/O conference for 10 years since 2009. It has also helped thousands of developers as an open-source sample.

To follow Modern Android Development best practices, check out theNow in Android repository, which replaces iosched as our real-world sample.

2021 Update

Due to global events, Google I/O 2020 was canceled and Google I/O 2021 is an online-only event, sothe companion app hasn't been updated since 2019. However, theiosched team has continuedadding several architecture improvements to its codebase.The general look and feel of the app is unchanged, and the appstill uses the data from Google I/O 2019.

Major improvements implemented in 2021:

  • Migration from LiveData to Kotlin Flows to observe data.
  • Support for large screens and other form factors.
  • Migration from SharedPreferences toJetpack DataStore.
  • (Experimental) Partial migration to Jetpack Compose(in thecompose branch)

Description

Google I/O is a developer conference with several days of deeptechnical content featuring technical sessions and hundreds of demonstrationsfrom developers showcasing their technologies.

This project is the Android app for the conference.

Running the app

The project contains astaging variant that replaces some modules at compile time so theydon't depend on remote services such as Firebase. This allows you to try out and test the appwithout the API keys.

Features

The app displays a list of conference events - sessions, office hours, appreviews, codelabs, etc. - and allows the user to filter these events by eventtypes and by topics (Android, Firebase, etc.). Users can see details aboutevents, and they can star events that interest them. Conference attendees canreserve events to guarantee a seat.

Other features include a Map of the venue, informational pages toguide attendees during the conference in Info, and time-relevant informationduring the conference in Home.

Schedule screenshot

Development Environment

The app is written entirely in Kotlin and uses the Gradle build system.

To build the app, use thegradlew build command or use "Import Project" inAndroid Studio. Android Studio Arctic Fox or newer is required and may be downloadedhere.

Architecture

The architecture is built aroundAndroid Architecture Componentsand follows the recommendations laid out in theGuide to App Architecture. Logic is kept awayfrom Activities and Fragments and moved toViewModels.Data is observed usingKotlin Flowsand theData Binding Librarybinds UI components in layouts to the app's data sources.

The Repository layer handles data operations. IOSched's data comesfrom a few different sources - user data is stored inCloud Firestore(either remotely or ina local cache for offline use), user preferences and settings are stored inDataStore, conference data is stored remotely and is fetched and storedin memory for the app to use, etc. - and the repository modulesare responsible for handling all data operations and abstracting the data sourcesfrom the rest of the app.

A lightweight domain layer sits between the data layerand the presentation layer, and handles discrete pieces of business logic offthe UI thread. See the.\*UseCase.kt files undershared/domain forexamples.

TheNavigation component is usedto implement navigation in the app, handling Fragment transactions and providing a consistentuser experience.

Room is usedfor Full Text Search usingFts4to search for a session, speaker, or codelab.

UI tests are written withEspressoand unit tests use Junit4 withMockito when necessary.

TheJetpack Benchmark librarymakes it easy to benchmark your code from within Android Studio.The library handles warmup, measures your code performance, and outputs benchmarkingresults to the Android Studio console. We added a few benchmark tests aroundcritical paths during app startup - in particular, the parsing of the bootstrapdata. This enables us to automate measuring and monitoring initial startup time.Here is an example from a benchmark run:

Started running testsConnected to process 30763 on device 'google-pixel_3'.benchmark:benchmark:    76,076,101 ns BootstrapConferenceDataSourceBenchmark.benchmark_json_parsingTests ran to completion.

Dependency Injection is implemented withHilt. For more detailson migrating fromdagger-android to Hilt, read the(migration article.

ViewPager2 offers enhanced functionality over theoriginal ViewPager library, such as right-to-left and vertical orientation support.For more details on migrating from ViewPager to ViewPager2, please see thismigration guide.

Firebase

The app makes considerable use of the following Firebase components:

  • Cloud Firestore is our sourcefor all user data (events starred or reserved by a user). Firestore gave usautomatic sync and also seamlessly managed offline functionalityfor us.
  • Firebase Cloud Functionsallowed us to run backend code. The reservations feature heavily depended on CloudFunctions working in conjuction with Firestore.
  • Firebase Cloud Messaginglet us inform the app about changes to conference data on our server.
  • Remote Config helped usmanage in-app constants.

For 2020, the implementation was migrated to the Firebase Kotlin extension (KTX) libraries towrite more idiomatic Kotlin code when calling Firebase APIs. To learn more,read thisFirebase blog articleon the Firebase KTX libraries.

Kotlin

The app is entirely written in Kotlin and uses Jetpack'sAndroid Ktx extensions.

Asynchronous tasks are handled withcoroutines. Coroutines allow for simpleand safe management of one-shot operations as well as building and consuming streams of data usingKotlin Flows.

All build scripts are written with theKotlin DSL.

Copyright

Copyright 2014 Google Inc. All rights reserved.Licensed under the Apache License, Version 2.0 (the "License");you may not use this file except in compliance with the License.You may obtain a copy of the License at    http://www.apache.org/licenses/LICENSE-2.0Unless required by applicable law or agreed to in writing, softwaredistributed under the License is distributed on an "AS IS" BASIS,WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.See the License for the specific language governing permissions andlimitations under the License.

[8]ページ先頭

©2009-2025 Movatter.jp