Convert Figma logo to code with AI

google logoiosched

The Google I/O Android App

21,774
6,205
21,774
76

Top Related Projects

Optimized UI components for Firebase

A collection of samples to discuss and showcase different architectural tools and patterns for Android apps.

17,635

A gardening app illustrating Android development best practices with migrating a View-based app to Jetpack Compose.

Official Jetpack Compose samples.

45,699

Square’s meticulous HTTP client for the JVM, Android, and GraalVM.

Quick Overview

Google I/O Schedule is the official Android app for the Google I/O conference. It provides attendees with a comprehensive schedule, session details, and interactive features to enhance their conference experience. The app also serves as a reference implementation of Android development best practices, showcasing the latest tools and technologies.

Pros

  • Demonstrates modern Android development techniques and architecture
  • Implements Material Design principles for a polished user interface
  • Utilizes Jetpack libraries and Kotlin for efficient and maintainable code
  • Serves as a learning resource for developers interested in Android app development

Cons

  • Specific to Google I/O conference, limiting its direct applicability for other events
  • May be overwhelming for beginners due to its complex architecture and advanced features
  • Requires frequent updates to stay relevant with each year's conference
  • Some features may be tightly coupled with Google's infrastructure, making it challenging to adapt for other purposes

Code Examples

// Example of using Kotlin coroutines for asynchronous operations
viewModelScope.launch {
    try {
        val sessions = sessionRepository.getSessions()
        _uiState.value = SessionsViewState.Success(sessions)
    } catch (e: Exception) {
        _uiState.value = SessionsViewState.Error(e)
    }
}
// Example of using Jetpack Compose for UI
@Composable
fun SessionItem(session: Session, onClick: () -> Unit) {
    Card(
        modifier = Modifier
            .fillMaxWidth()
            .clickable(onClick = onClick),
        elevation = 4.dp
    ) {
        Column(modifier = Modifier.padding(16.dp)) {
            Text(text = session.title, style = MaterialTheme.typography.h6)
            Text(text = session.description, style = MaterialTheme.typography.body2)
        }
    }
}
// Example of using Dagger Hilt for dependency injection
@Module
@InstallIn(SingletonComponent::class)
object AppModule {
    @Provides
    @Singleton
    fun provideSessionRepository(
        remoteDataSource: RemoteDataSource,
        localDataSource: LocalDataSource
    ): SessionRepository {
        return SessionRepositoryImpl(remoteDataSource, localDataSource)
    }
}

Getting Started

To get started with the Google I/O Schedule app:

  1. Clone the repository:

    git clone https://github.com/google/iosched.git
    
  2. Open the project in Android Studio.

  3. Build and run the app on an emulator or physical device.

  4. Explore the codebase to learn about Android development best practices and modern architecture patterns.

Competitor Comparisons

Optimized UI components for Firebase

Pros of FirebaseUI-Android

  • More focused and specialized library for Firebase integration
  • Regularly updated with new features and bug fixes
  • Extensive documentation and examples for easy implementation

Cons of FirebaseUI-Android

  • Limited to Firebase-specific functionality
  • May require additional setup for non-Firebase related tasks
  • Less comprehensive app structure compared to a full application template

Code Comparison

FirebaseUI-Android:

// User authentication
AuthUI.getInstance()
    .createSignInIntentBuilder()
    .setAvailableProviders(providers)
    .build()

iosched:

// User authentication
viewModel.performSignInAction().observe(this, Observer { signInResult ->
    when (signInResult) {
        is SignInResult.Success -> navigateToSignedInGraph()
        is SignInResult.Error -> showErrorMessage(signInResult.errorMessage)
    }
})

FirebaseUI-Android provides a more streamlined approach for Firebase-specific tasks, while iosched offers a broader, more customizable structure for a complete application. FirebaseUI-Android is ideal for projects heavily reliant on Firebase services, whereas iosched serves as a comprehensive template for building full-featured Android applications, particularly those related to event management and scheduling.

A collection of samples to discuss and showcase different architectural tools and patterns for Android apps.

Pros of architecture-samples

  • Focuses on demonstrating various Android architecture patterns, making it more educational for developers learning best practices
  • Includes multiple sample apps showcasing different architectural approaches (e.g., MVP, MVVM, MVI)
  • Regularly updated with newer Android development techniques and libraries

Cons of architecture-samples

  • Lacks the real-world complexity of a full-featured app like iosched
  • Does not demonstrate integration with backend services or complex data synchronization
  • May not cover all aspects of app development, such as UI/UX design or performance optimization

Code Comparison

architecture-samples (MVVM pattern):

@Composable
fun TasksScreen(
    onAddTask: () -> Unit,
    onTaskClick: (Task) -> Unit,
    modifier: Modifier = Modifier,
    viewModel: TasksViewModel = hiltViewModel()
) {
    // ... Screen implementation
}

iosched (Single Activity pattern):

class MainActivity : AppCompatActivity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_main)
        // ... Navigation setup
    }
}

The architecture-samples code demonstrates a Composable function for a tasks screen using MVVM, while iosched shows a more traditional single-activity approach.

17,635

A gardening app illustrating Android development best practices with migrating a View-based app to Jetpack Compose.

Pros of Sunflower

  • More focused on demonstrating Android development best practices
  • Simpler codebase, making it easier for beginners to understand
  • Regularly updated with the latest Android architecture components

Cons of Sunflower

  • Less complex functionality compared to iosched
  • Fewer features and real-world application scenarios
  • Limited to Android-specific technologies

Code Comparison

Sunflower (Kotlin):

@Composable
fun PlantListItem(plant: Plant, onClick: () -> Unit) {
    Surface(
        shape = MaterialTheme.shapes.medium,
        modifier = Modifier
            .padding(horizontal = 16.dp, vertical = 8.dp)
            .clickable(onClick = onClick)
    ) {
        // ... rest of the composable function
    }
}

iosched (Java):

public class SessionDetailFragment extends DaggerFragment implements Injectable {
    @Inject ViewModelProvider.Factory viewModelFactory;
    private SessionDetailViewModel viewModel;

    @Override
    public void onActivityCreated(@Nullable Bundle savedInstanceState) {
        super.onActivityCreated(savedInstanceState);
        viewModel = ViewModelProviders.of(this, viewModelFactory).get(SessionDetailViewModel.class);
        // ... rest of the method
    }
}

Both repositories serve as examples of Android app development, but Sunflower focuses on simplicity and best practices, while iosched offers a more complex, feature-rich application structure. Sunflower uses Kotlin and Jetpack Compose, while iosched primarily uses Java and XML layouts.

Official Jetpack Compose samples.

Pros of compose-samples

  • Focuses on Jetpack Compose, showcasing modern Android UI development
  • Offers a wider variety of sample apps, covering different use cases
  • More frequently updated, reflecting the latest Compose best practices

Cons of compose-samples

  • Less comprehensive in terms of full app architecture compared to iosched
  • May be more challenging for beginners due to its focus on newer technologies
  • Lacks some features present in iosched, such as offline support and data syncing

Code Comparison

iosched (Java):

@Inject
ScheduleUiHintsViewModel(
    LoadUserSessionUseCase loadUserSessionUseCase,
    LoadScheduleUserSessionsUseCase loadScheduleUserSessionsUseCase,
    GetTimeZoneUseCase getTimeZoneUseCase
) {
    // ...
}

compose-samples (Kotlin):

@Composable
fun HomeScreen(
    onNavigateToPlayer: (MediaItem) -> Unit,
    modifier: Modifier = Modifier
) {
    // ...
}

The code snippets highlight the shift from Java to Kotlin and the adoption of Jetpack Compose in modern Android development. iosched uses traditional dependency injection and view models, while compose-samples leverages Compose's declarative UI approach.

45,699

Square’s meticulous HTTP client for the JVM, Android, and GraalVM.

Pros of OkHttp

  • More focused and specialized library for HTTP networking
  • Wider adoption and usage across various Android projects
  • Better performance and efficiency for network operations

Cons of OkHttp

  • Limited to HTTP/HTTPS networking, unlike iosched's broader feature set
  • Requires additional libraries for more complex networking tasks
  • Less integrated with Google's ecosystem and services

Code Comparison

iosched (Kotlin):

private fun fetchSessionsJson() {
    viewModelScope.launch {
        val result = sessionRepository.getSessions()
        _sessions.value = result
    }
}

OkHttp (Java):

OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
    .url("https://api.example.com/data")
    .build();
Response response = client.newCall(request).execute();

Summary

OkHttp is a specialized HTTP client library, while iosched is a full-featured conference app. OkHttp excels in networking performance and efficiency, making it a popular choice for Android developers. However, iosched offers a more comprehensive set of features for event management and scheduling. The code comparison shows that OkHttp provides a lower-level API for network requests, while iosched abstracts network operations within its architecture.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

Google I/O Android App (ARCHIVED)

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 the Now 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, so the companion app hasn't been updated since 2019. However, the iosched team has continued adding several architecture improvements to its codebase. The general look and feel of the app is unchanged, and the app still 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 to Jetpack DataStore.
  • (Experimental) Partial migration to Jetpack Compose (in the compose branch)

Description

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

This project is the Android app for the conference.

Running the app

The project contains a staging variant that replaces some modules at compile time so they don't depend on remote services such as Firebase. This allows you to try out and test the app without the API keys.

Features

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

Other features include a Map of the venue, informational pages to guide attendees during the conference in Info, and time-relevant information during 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 the gradlew build command or use "Import Project" in Android Studio. Android Studio Arctic Fox or newer is required and may be downloaded here.

Architecture

The architecture is built around Android Architecture Components and follows the recommendations laid out in the Guide to App Architecture. Logic is kept away from Activities and Fragments and moved to ViewModels. Data is observed using Kotlin Flows and the Data Binding Library binds UI components in layouts to the app's data sources.

The Repository layer handles data operations. IOSched's data comes from a few different sources - user data is stored in Cloud Firestore (either remotely or in a local cache for offline use), user preferences and settings are stored in DataStore, conference data is stored remotely and is fetched and stored in memory for the app to use, etc. - and the repository modules are responsible for handling all data operations and abstracting the data sources from the rest of the app.

A lightweight domain layer sits between the data layer and the presentation layer, and handles discrete pieces of business logic off the UI thread. See the .\*UseCase.kt files under shared/domain for examples.

The Navigation component is used to implement navigation in the app, handling Fragment transactions and providing a consistent user experience.

Room is used for Full Text Search using Fts4 to search for a session, speaker, or codelab.

UI tests are written with Espresso and unit tests use Junit4 with Mockito when necessary.

The Jetpack Benchmark library makes it easy to benchmark your code from within Android Studio. The library handles warmup, measures your code performance, and outputs benchmarking results to the Android Studio console. We added a few benchmark tests around critical paths during app startup - in particular, the parsing of the bootstrap data. This enables us to automate measuring and monitoring initial startup time. Here is an example from a benchmark run:

Started running tests

Connected to process 30763 on device 'google-pixel_3'.
benchmark:
benchmark:    76,076,101 ns BootstrapConferenceDataSourceBenchmark.benchmark_json_parsing
Tests ran to completion.

Dependency Injection is implemented with Hilt. For more details on migrating from dagger-android to Hilt, read the (migration article.

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

Firebase

The app makes considerable use of the following Firebase components:

  • Cloud Firestore is our source for all user data (events starred or reserved by a user). Firestore gave us automatic sync and also seamlessly managed offline functionality for us.
  • Firebase Cloud Functions allowed us to run backend code. The reservations feature heavily depended on Cloud Functions working in conjuction with Firestore.
  • Firebase Cloud Messaging let us inform the app about changes to conference data on our server.
  • Remote Config helped us manage in-app constants.

For 2020, the implementation was migrated to the Firebase Kotlin extension (KTX) libraries to write more idiomatic Kotlin code when calling Firebase APIs. To learn more, read this Firebase blog article on the Firebase KTX libraries.

Kotlin

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

Asynchronous tasks are handled with coroutines. Coroutines allow for simple and safe management of one-shot operations as well as building and consuming streams of data using Kotlin Flows.

All build scripts are written with the Kotlin 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.0

Unless required by applicable law or agreed to in writing, software
distributed 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 and
limitations under the License.