Git Product home page Git Product logo

iosched's Introduction

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.

iosched's People

Contributors

ardock avatar benbaxter avatar btco avatar dagalpin avatar eyecatchup avatar florina-muntenescu avatar freewheelnat avatar gaurav414u avatar jdkoren avatar jfschmakeit avatar josealcerreca avatar judax avatar keyboardsurfer avatar kroikie avatar mangini avatar mlykotom avatar nageshs avatar naokigoogle avatar nickbutcher avatar nuhkoca avatar objcode avatar paulrashidi avatar rock3r avatar romannurik avatar shailen avatar thagikura avatar tiembo avatar tjohns avatar wojtek-kalicinski avatar yaraki avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

iosched's Issues

Sessions feedback feature

Any ideas how to customize the app keeping feedback feature?

As I can see you are using EventPoint API for session feedback feature.
Is it free or paid service? And what about creating app engine app for handling sessions feedback?

Bug in LoginAndAuthHelper.java, onActivityResult()

Hi Roman,

First, thank you and your fellow teammembers for posting this great example.

I've been trying to use the LoginAndAuthHelper class and noticed what appears to be a bug --

The code will never enter the second check for requestCode == REQUEST_RECOVER_FROM_PLAY_SERVICES_ERROR, since it's nested inside the first IF check.

I think you want another OR clause in the first check.

/** Handles an Activity result. Call this from your Activity's onActivityResult(). */
public boolean onActivityResult(int requestCode, int resultCode, Intent data) {
    Activity activity = getActivity("onActivityResult()");
    if (activity == null) {
        return false;
    }

    if (requestCode == REQUEST_AUTHENTICATE ||
            requestCode == REQUEST_RECOVER_FROM_AUTH_ERROR ||
            requestCode == REQUEST_PLAY_SERVICES_ERROR_DIALOG) {

        LOGD(TAG, "onActivityResult, req=" + requestCode + ", result=" + resultCode);
        if (requestCode == REQUEST_RECOVER_FROM_PLAY_SERVICES_ERROR) {
            mResolving = false;
        }

.
.
.

Update Google Play Services message on nexus5 with Android-L and last GPS version installed

When i build the iosched app on nexus5 with Android-L following the BUILDING.md steps, I always get the message "Update Google Play Services". See image:
https://cloud.githubusercontent.com/assets/1361086/3770738/46ebafae-18ee-11e4-8961-cfb28b5d7a0d.png

If I press Update button, nothing change as i have last version installed.

I tried removing https://dl-ssl.google.com/android/repository/addon-play-services-5.xml , reinstall Play Services etc. and no luck.

Tried classic version on nexus7 2012 & Samsung S2 and same message.

I'll try follow extra server steps that i thought were optional.
https://github.com/ardock/iosched/blob/master/doc/BUILDING.md#server-side-setup

amolgupta has same problem, he wrote it here:
#19

amolgupta commented 7 days ago
I tried to compile the code and run it on my Nexus 5 with Android-L system image. Unfortunately I am getting the same error. I included the developer preview play services v5 while comiling from https://dl-ssl.google.com/android/repository/addon-play-services-5.xml

When i debug i get:
08-16 00:05:41.116 28421-28594/com.google.samples.apps.iosched E/iosched_GCM﹕ Received error: INVALID_PARAMETERS
08-16 00:05:46.857 28421-28488/com.google.samples.apps.iosched E/GooglePlayServicesUtil﹕ GooglePlayServices not available due to error 2
08-16 00:05:47.047 28421-28726/com.google.samples.apps.iosched E/iosched_GCM﹕ Received error: INVALID_PARAMETERS
08-16 00:05:47.195 28421-28691/com.google.samples.apps.iosched E/iosched_SpeakersHandler﹕ Error querying speaker hashcodes (no records returned)
08-16 00:05:47.764 28421-28691/com.google.samples.apps.iosched E/iosched_VideosHandler﹕ Error querying video hashcodes (no records returned)
08-16 00:05:48.954 28421-28691/com.google.samples.apps.iosched E/SQLiteLog﹕ (284) automatic index on sqlite_sq_B7A25D00(session_id)
08-16 00:05:49.277 28421-28809/com.google.samples.apps.iosched E/GooglePlayServicesUtil﹕ GooglePlayServices not available due to error 2
08-16 00:05:49.282 28421-28809/com.google.samples.apps.iosched E/iosched_HTTPUserDataSy﹕ Could not sync myschedule
com.google.api.client.googleapis.extensions.android.gms.auth.GooglePlayServicesAvailabilityIOException
at com.google.api.client.googleapis.extensions.android.gms.auth.GoogleAccountCredential$RequestHandler.intercept(GoogleAccountCredential.java:282)
at com.google.api.client.http.HttpRequest.execute(HttpRequest.java:859)
at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(AbstractGoogleClientRequest.java:410)
at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(AbstractGoogleClientRequest.java:343)
at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.execute(AbstractGoogleClientRequest.java:460)
at com.google.samples.apps.iosched.sync.userdata.http.DriveTask.getOrCreateFile(DriveTask.java:101)
at com.google.samples.apps.iosched.sync.userdata.http.GetOrCreateFIleDriveTask.execute(GetOrCreateFIleDriveTask.java:44)
at com.google.samples.apps.iosched.sync.userdata.http.HTTPUserDataSyncHelper.fetchRemote(HTTPUserDataSyncHelper.java:188)
at com.google.samples.apps.iosched.sync.userdata.http.HTTPUserDataSyncHelper.syncImpl(HTTPUserDataSyncHelper.java:94)
at com.google.samples.apps.iosched.sync.userdata.AbstractUserDataSyncHelper.sync(AbstractUserDataSyncHelper.java:115)
at com.google.samples.apps.iosched.sync.SyncHelper.doUserScheduleSync(SyncHelper.java:300)
at com.google.samples.apps.iosched.sync.SyncHelper.performSync(SyncHelper.java:161)
at com.google.samples.apps.iosched.sync.SyncAdapter.onPerformSync(SyncAdapter.java:78)
at android.content.AbstractThreadedSyncAdapter$SyncThread.run(AbstractThreadedSyncAdapter.java:259)
Caused by: com.google.android.gms.auth.GooglePlayServicesAvailabilityException: Google Play Services not available
at com.google.android.gms.auth.GoogleAuthUtil.w(Unknown Source)
at com.google.android.gms.auth.GoogleAuthUtil.getToken(Unknown Source)
at com.google.android.gms.auth.GoogleAuthUtil.getToken(Unknown Source)
at com.google.api.client.googleapis.extensions.android.gms.auth.GoogleAccountCredential.getToken(GoogleAccountCredential.java:255)
at com.google.api.client.googleapis.extensions.android.gms.auth.GoogleAccountCredential$RequestHandler.intercept(GoogleAccountCredential.java:279)
            at com.google.api.client.http.HttpRequest.execute(HttpRequest.java:859)
            at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(AbstractGoogleClientRequest.java:410)
            at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(AbstractGoogleClientRequest.java:343)
            at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.execute(AbstractGoogleClientRequest.java:460)
            at com.google.samples.apps.iosched.sync.userdata.http.DriveTask.getOrCreateFile(DriveTask.java:101)
            at com.google.samples.apps.iosched.sync.userdata.http.GetOrCreateFIleDriveTask.execute(GetOrCreateFIleDriveTask.java:44)
            at com.google.samples.apps.iosched.sync.userdata.http.HTTPUserDataSyncHelper.fetchRemote(HTTPUserDataSyncHelper.java:188)
            at com.google.samples.apps.iosched.sync.userdata.http.HTTPUserDataSyncHelper.syncImpl(HTTPUserDataSyncHelper.java:94)
            at com.google.samples.apps.iosched.sync.userdata.AbstractUserDataSyncHelper.sync(AbstractUserDataSyncHelper.java:115)
            at com.google.samples.apps.iosched.sync.SyncHelper.doUserScheduleSync(SyncHelper.java:300)
            at com.google.samples.apps.iosched.sync.SyncHelper.performSync(SyncHelper.java:161)
            at com.google.samples.apps.iosched.sync.SyncAdapter.onPerformSync(SyncAdapter.java:78)
            at android.content.AbstractThreadedSyncAdapter$SyncThread.run(AbstractThreadedSyncAdapter.java:259)

Publish Instrumentation Tests

It appears that there were no instrumentation tests published in the latest release. It would be helpful for new Android developers to see how Google tests their Android apps.

Feedback and analytics

Any idea on how to configure AnalyticsManager? I have already set ga_trackingId in res/xml/analytics_debug.xml as well as analytics_release.xml. But cannot see any realtime reporting.

Also, what about session feebacks? Where do they go?

Renaming the package

I am developing an app with the help of iosched.
So there is a need to change the package name.. But it's getting very complicated.

Can someone tell me the procedure to rename the package without getting any errors??

Issue: CI configuration and gradle-wrapper.jar files need be fixed/updated

CI builds are failing due "device not found" or "code 137" errors and the project includes an outdated gradle-wrapper.jar version 1.6 (current version is 2.2.1).

The wrapper is used to test contributions and I'm worried about the changes included in new versions.

If a project member updates the binary we all could use the same version locally and using CI server.

wrapper changes 1 2014-12-11 09 06 13

wrapper changes 2 2014-12-11 09 05 33

One option is to add a gradle task to the project build file or execute the task on CI builds.
http://www.gradle.org/docs/current/userguide/gradle_wrapper.html

Project build fails on Android Studio

After following the documentation for building the app build fails saying

Error:FAILURE: Build failed with an exception.

  • What went wrong:
    Task 'assemble' not found in root project 'iosched'.
  • Try:
    Run gradle tasks to get a list of available tasks. Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

Information:Total time: 12 mins 55.043 secs
Information:BUILD FAILED

OS: Ubuntu 14.04
Android Studio: 0.8

Extra comma found in DEFAULT_SORT of FeedBack class

file ScheduleContract.java

can this extra comma cause problems?

public static class Feedback implements BaseColumns, FeedbackColumns, SyncColumns {
...
/** Default "ORDER BY" clause. */
public static final String DEFAULT_SORT = BaseColumns._ID + " ASC, ";
...
}

Sync loop

Go to FeedbackSyncHelper.java (line 84):

cr.update(ScheduleContract.Feedback.buildFeedbackUri(sessionId), contentValues, null, null);

This will call

context.getContentResolver().notifyChange(uri, null);

in the ScheduleProvider.java and initialize another sync, making an infinite loop.

or am I wrong?

OAuth integration

I have made a project in google's developer console and also added relevant Api's. After that i think i have to edit Config.java..Specifically these two lines
public static final String APP_NAME = "Confluence";
public static final String API_KEY = "my api key";
Now when i rebuild and install this application..at the start it is still showing Google I/O wants the permissions instead of showing "Confluence".
I have added client id of my application with debug key as well. Am i missing something?

Issues Running on LPreview emulator

After following the build instructions, I installed the app on L Preview emulator using ./gradlew -Plpreview installLpreviewDebug. When I launch this app, I keep getting a dialog asking me to update to the latest Play Services. The message says without this the app won't work. Clicking on Update doesn't seem to have any effect. The dialog appears again.

I wonder whether an emulator with Google APIs is required to run the I/O app? In the SDK Manager I don't see an L Preview system image emulator with Google APIs.

I should also note that when I try to add a Google Account in my emulator, the account manager crashes. I'm not sure whether the Play Services issue is because of this.

The Usage of the keyword of 'final'

I have read part of source codes of this project. In the package of util, I saw much usage of 'final' keyword. For instance, there is a method in PrefUtil.java:

public static void setAttendeeAtVenue(final Context context, final boolean isAtVenue) {
    SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(context);
    sp.edit().putBoolean(PREF_ATTENDEE_AT_VENUE, isAtVenue).commit();
} 

In this method, all arguments are modified by 'final'. And I encountered a few cases like this somewhere else. But I didn't understand the effect of 'final'. So, I ask for help here to erase questions in my mind.

Json Sync procedure in detail

what do you mean by saying that the
"Note that each of the entries in the data_files array is actually
a pointer to another JSON file, which in turn contains information
about each type of entity."

Could sumone give any other example for JSON SYNCING !!

Crash when tapping All Years / All Topics Spinner in Video library

There is a crash in Video library when tapping on All Years / All Topics Spinner. Following is the log:

09-26 08:28:40.116: E/AndroidRuntime(5058): FATAL EXCEPTION: main
09-26 08:28:40.116: E/AndroidRuntime(5058): Process: com.google.samples.apps.iosched, PID: 5058
09-26 08:28:40.116: E/AndroidRuntime(5058): java.lang.NullPointerException
09-26 08:28:40.116: E/AndroidRuntime(5058): at android.widget.ArrayAdapter.createViewFromResource(ArrayAdapter.java:392)
09-26 08:28:40.116: E/AndroidRuntime(5058): at android.widget.ArrayAdapter.getDropDownView(ArrayAdapter.java:415)
09-26 08:28:40.116: E/AndroidRuntime(5058): at android.widget.Spinner$DropDownAdapter.getDropDownView(Spinner.java:853)
09-26 08:28:40.116: E/AndroidRuntime(5058): at android.widget.Spinner$DropDownAdapter.getView(Spinner.java:849)
09-26 08:28:40.116: E/AndroidRuntime(5058): at android.widget.Spinner.measureContentWidth(Spinner.java:734)
09-26 08:28:40.116: E/AndroidRuntime(5058): at android.widget.Spinner$DropdownPopup.computeContentWidth(Spinner.java:1081)
09-26 08:28:40.116: E/AndroidRuntime(5058): at android.widget.Spinner$DropdownPopup.show(Spinner.java:1107)
09-26 08:28:40.116: E/AndroidRuntime(5058): at android.widget.Spinner.performClick(Spinner.java:658)
09-26 08:28:40.116: E/AndroidRuntime(5058): at android.view.View$PerformClick.run(View.java:18422)
09-26 08:28:40.116: E/AndroidRuntime(5058): at android.os.Handler.handleCallback(Handler.java:733)
09-26 08:28:40.116: E/AndroidRuntime(5058): at android.os.Handler.dispatchMessage(Handler.java:95)
09-26 08:28:40.116: E/AndroidRuntime(5058): at android.os.Looper.loop(Looper.java:136)
09-26 08:28:40.116: E/AndroidRuntime(5058): at android.app.ActivityThread.main(ActivityThread.java:5017)
09-26 08:28:40.116: E/AndroidRuntime(5058): at java.lang.reflect.Method.invokeNative(Native Method)
09-26 08:28:40.116: E/AndroidRuntime(5058): at java.lang.reflect.Method.invoke(Method.java:515)
09-26 08:28:40.116: E/AndroidRuntime(5058): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
09-26 08:28:40.116: E/AndroidRuntime(5058): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
09-26 08:28:40.116: E/AndroidRuntime(5058): at dalvik.system.NativeStart.main(Native Method)

No Test Case in the project

It's great resource to learn the newest Android SDK from the source code. However, I was surprise to see there is no test case in the project. Is there anything I missed or you wouldn't expose the Unit test or Integration tests to us?

deleteDatabase not working under Lollipop

I think this call is actually never made in the current iosched version, but since I am using the same method in another app and ran into this issue I tried to make the same call in the iosched app.

context.getContentResolver().delete(ScheduleContract.BASE_CONTENT_URI, null, null);

this works in pre API 21 but results in this under Lollipop:

11-12 16:33:52.187    2312-2312/com.google.samples.apps.iosched D/iosched_ScheduleProvid﹕ delete(uri=content://com.google.samples.apps.iosched, account=*****@gmail.com)
11-12 16:33:52.187    2312-2312/com.google.samples.apps.iosched D/AndroidRuntime﹕ Shutting down VM
    --------- beginning of crash
11-12 16:33:52.188    2312-2312/com.google.samples.apps.iosched E/AndroidRuntime﹕ FATAL EXCEPTION: main
    Process: com.google.samples.apps.iosched, PID: 2312
    java.lang.UnsupportedOperationException: Unknown uri for -1: content://com.google.samples.apps.iosched
            at com.google.samples.apps.iosched.provider.ScheduleProvider.buildSimpleSelection(ScheduleProvider.java:749)
            at com.google.samples.apps.iosched.provider.ScheduleProvider.delete(ScheduleProvider.java:555)
            at android.content.ContentProvider$Transport.delete(ContentProvider.java:309)
            at android.content.ContentResolver.delete(ContentResolver.java:1299)

it looks like the uri parsing is causing the issue.
The passed uri is "content://com.google.samples.apps.iosched" which is exactly the ScheduleContract.BASE_CONTENT_URI but the statement to delete the database is never reached in the ScheduleProviders delete method.

    @Override
    public int delete(Uri uri, String selection, String[] selectionArgs) {
        String accountName = getCurrentAccountName(uri, false);
        LOGV(TAG, "delete(uri=" + uri + ", account=" + accountName + ")");
        if (uri == ScheduleContract.BASE_CONTENT_URI) {
            // Handle whole database deletes (e.g. when signing out)
            deleteDatabase();
            notifyChange(uri);
            return 1;
        }

Wearables project's Util.LOGD accidentally recursive

In the Wearables project, the Utils.LOGD method calls itself, whereas it should call Log.d?

public static final void LOGD(String TAG, String message) {
    if (Log.isLoggable(TAG, Log.DEBUG)) {
        LOGD(TAG, message);
    }
}

Why prefs.commit() is used instead of apply()?

   public static void markUserRefusedSignIn(final Context context, final boolean refused) {
        SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(context);
        sp.edit().putBoolean(PREF_USER_REFUSED_SIGN_IN, refused).commit();
    }

http://developer.android.com/reference/android/content/SharedPreferences.Editor.html#commit()

"If you don't care about the return value and you're using this from your application's main thread, >consider using apply() instead."

Just wanted to know is there any specific reason for commit() being used.

Can't sync with Google+ profile data

I'm noticing that my Google Plus image and name are not showing up in the navigation drawer, but it used to.

Checking logcat, I see: Unexpected response code 403 for https://www.googleapis.com/plus/v1/people/me

Did a G+ scope change? Any ideas?

Sample stack trace:
11-05 01:45:46.365 990-2394/? E/Volley﹕ [93] a.a: Unexpected response code 403 for https://www.googleapis.com/plus/v1/people/me
11-05 01:45:46.365 24350-24350/PACKAGE D/iosched_LoginAndAuthHe﹕ Helper connected, account ACCOUNT_NAME
11-05 01:45:46.365 24350-24350/PACKAGE D/iosched_LoginAndAuthHe﹕ We don't have Google+ info for ACCOUNT_NAME yet, so loading.
11-05 01:45:46.365 24350-24350/PACKAGE D/iosched_LoginAndAuthHe﹕ No need for auth token, we already have it.
11-05 01:45:46.365 24350-24350/PACKAGE D/iosched_LoginAndAuthHe﹕ Auth success for account ACCOUNT_NAME, newlyAuthenticated=false
11-05 01:45:46.365 24350-24350/PACKAGE D/iosched_BaseActivity﹕ onAuthSuccess, account ACCOUNT_NAME, newlyAuthenticated=false
11-05 01:45:46.365 24350-24350/PACKAGE D/iosched_BaseActivity﹕ Refreshing MySchedule data
11-05 01:45:46.405 24350-24350/PACKAGE D/iosched_GCMs﹕ GCM registration is valid and for the correct gcm key: b32e........27e9
11-05 01:45:46.405 24350-24350/PACKAGE I/iosched_BaseActivity﹕ Already registered on the GCM server with right GCM key.
11-05 01:45:46.515 24350-24350/PACKAGE D/iosched_LoginAndAuthHe﹕ onPeopleLoaded, status=Status{statusCode=NETWORK_ERROR, resolution=null}
11-05 01:45:46.515 24350-24350/PACKAGE E/iosched_LoginAndAuthHe﹕ Failed to load plus proflie, error 7

Bug: Feedback sent to server can be incorrectly numbered.

There's a bug in FeedbackSyncHelper where the ArrayList of questions isn't cleared between sending feedback results. This means that if two sessions are synced during a single method invocation the app submits q1,q2,q3,q4,q5 then q1,q2,q3,q4,q5,q6,q7,q8,q9,q10 as the parameter names instead of sending q1 to q5 for each request.

This means that server side code parsing q1 to q5 will get incorrect results for the second and any subsequent GET requests created because q1 to q5 will always contain the feedback for the first session, but the parameters relating to identifying the session will correspond to the second and subsequent sessions for which the data should be synced, meaning feedback for the first session gets assigned to all the sessions being synchronised in that invocation.

Evidence that this is happening can be seen in the server access logs where calls to the feedback synchronisation end point have parameters starting q which have numbers above 5.

Complete action using : Session Information - conflict when having multiple IO apps

We are building this app using ioschecd, we could successfully change the package name and application id, so, that it is distinct in app store.

Now the issue is if I have google io or any other clone of this app installed, When I tap on a session, it pops up the "Complete action using" dialog with heading "Session Information" and the app name.

How do we make these distinct?

Clone/Import fails on Android studio 0.9.2

I just took a clone of this project and no matter what option i choose, ("default gradle, customizable gradle, local gradle"), it gives me this error:

studio_error

I thought it'll download 0.12.2, but no it just gets stuck there. Am I missing any steps here?

Android Studio fails to build project

Following the BULDING.txt file instructions, Android Studio fails to build the project with the message:

Task 'assemble' not found in root project 'iosched'.

The "Gradle tasks" list is empty in Android Studio

Cannot import project using Android-Studio :

I get the next error:
Error:A problem occurred configuring project ':Wearable'.

Could not resolve all dependencies for configuration ':Wearable:_debugCompile'.
Could not find any version that matches com.google.android.support:wearable:+.
Required by:
iosched:Wearable:unspecified
Could not find any version that matches com.google.android.gms:play-services-wearable:6.1.+.
Required by:
iosched:Wearable:unspecified

I've tried installing various stuff on the SDK manager, but I can't handle those errors for some reason.
Any help would be appreciated .

Android L preview APK does not install

When installing APK provided in readme:

Failure [INSTALL_FAILED_DUPLICATE_PERMISSION perm=com.google.samples.apps.iosched.permission.MAPS_RECEIVE pkg=com.google.samples.apps.iosched]

Critical - Crash on some Samsung devices with android 4.2.2

App will always crash on some Samsung devices with android 4.2.2. Replicated on Samsung Galaxy Light model SGH-T399. You can replicate it using https://appthwack.com/devicelab
It's critical because all apps which user appcompat v21 toolbar will crash on these devices.

Stacktrace:
java.lang.NoClassDefFoundError: android.support.v7.internal.view.menu.MenuBuilder at android.support.v7.widget.ActionMenuView.getMenu(ActionMenuView.java:620) at android.support.v7.widget.Toolbar.ensureMenu(Toolbar.java:823) at android.support.v7.widget.Toolbar.getMenu(Toolbar.java:815) at android.support.v7.internal.app.ToolbarActionBar.getMenu(ToolbarActionBar.java:554) at android.support.v7.internal.app.ToolbarActionBar.setListMenuPresenter(ToolbarActionBar.java:558) at android.support.v7.app.ActionBarActivityDelegateBase.setSupportActionBar(ActionBarActivityDelegateBase.java:178) at android.support.v7.app.ActionBarActivity.setSupportActionBar(ActionBarActivity.java:92) at com.google.samples.apps.iosched.ui.BaseActivity.getActionBarToolbar(BaseActivity.java:1253) at com.google.samples.apps.iosched.ui.BaseActivity.setContentView(BaseActivity.java:423) at com.google.samples.apps.iosched.ui.BrowseSessionsActivity.onCreate(BrowseSessionsActivity.java:92) at android.app.Activity.performCreate(Activity.java:5326) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1097) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2213) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2304) at android.app.ActivityThread.access$700(ActivityThread.java:152) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1284) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:176) at android.app.ActivityThread.main(ActivityThread.java:5299) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:511) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1102) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:869) at dalvik.system.NativeStart.main(Native Method)

Changing TimeZone in the app

Hi, I tried to change the TimeZone of the app using the the following line in "config.java" file.

public static final TimeZone CONFERENCE_TIMEZONE = TimeZone.getTimeZone("Asia/Kolkata");

It doesn't seem to be the only manipulation.
Can someone tell, what else needs to be done to change it ?

Signing the app

What is the procedure to sign the app and get the app running with proper data sync..
Right now it shows
com.google.api.client.googleapis.json.GoogleJsonResponseException: 403 Forbidden
{
"code": 403,
"errors": [
{
"domain": "usageLimits",
"message": "Access Not Configured. Please use Google Developers Console to activate the API for your project.",
"reason": "accessNotConfigured"
}
],
"message": "Access Not Configured. Please use Google Developers Console to activate the API for your project."
}

Focus issue using collection view

I'm trying to reuse the Collection view in my application. I've used your own views and all and it works fine. The only issue I'm having is, when I click an item in a multi column row, the entire row gets highlighted.

I've tried everything but it doesn't seem to work. I can't post any code as I'm on mobile and it didn't occur to me to ask on here until I left the office.

However, it just occurred to me I'm doing something g different. I'm not only creating rows with different columns, but I'm adding headers as well. Could this be the cause?

Any pointers on where to look will be great.

DrawInsets related files use API16+ method (minSdkVersion is 14)

ScrimInsetsFrameLayout.java#L68 and ScrimInsetsScrollView.java#L68 have this method :

@OverRide
protected boolean fitSystemWindows(Rect insets) {...
postInvalidateOnAnimation(); ... }

fitSystemWindows method is deprecated

postInvalidateOnAnimation() is API16+ and project minSdkVersion is 14. Update min or use:
ViewCompat.postInvalidateOnAnimation(this) or ...

Links:

https://gist.github.com/romannurik/8919163

http://developer.android.com/reference/android/support/v4/view/ViewCompat.html#postInvalidateOnAnimation(android.view.View)

build failed(Android Studio (Beta) 0.8.6)

Error:A problem was found with the configuration of task ':android:packageClassicDebug'.

File 'E:\others\iosched-master\android\debug.keystore' specified for property 'signingConfig.storeFile' does not exist.
help!!!

Question: why isn't closed called on the database in the provider?

I'm wondering why the ContentProvider never bothers calling close on the the database helper. The documentation for SQLiteOpenHelper says 'Make sure to call close when you no longer need the database' for the method getWritableDatabase. Yet the Provider never calls it after calling this method.

ScrollView inside Navigation Drawer Lag

Tried installing this on a Galaxy Nexus running IceCreamSandwichMR2

Kernel:
3.0.8-ge28757d
android-build@apa28 # 1

Build:
yakju-userdebug IceCreamSandwichMR2

I believe it's stock.

Anyway, I tried adding more items into the navigation drawer following iosched app (under BaseActivity.java, inside populateNavDrawer method, just add more stuff into mNavDrawerItems).
The ScrollView is barely scrollable. I just added more NAVDRAWER_ITEM_SETTINGS, like 10 times, and as I scroll through the ScrollView, it keeps stuttering. The scroll just stops and I have to lift my finger up and do it again only to move the scroll a tiny bit and repeat.

Tried it on my Nexus 5 (running latest Android all stock), the problem doesn't seem to appear.
Is it more of hardware problem or Android version?
Is it better to create Navigation Drawer using ListView instead of what this app (iosched) does?

Thanks.

P.S. uploaded a video: https://www.youtube.com/watch?v=cmFkFDvEoKU&feature=youtu.be
Should be unlisted.

GCMBaseIntentService is deprecated

android/src/main/java/com/google/samples/apps/iosched/gcm/GCMIntentService.java

The GCM portion of the I/O sample is implemented using a demo client library that is deprecated:

http://developer.android.com/reference/com/google/android/gcm/GCMBaseIntentService.html

These "helper libraries" were always intended as a demo; they've never been an official, supported API.

We want people to use the official GMS Core API now:

http://developer.android.com/reference/com/google/android/gms/gcm/GoogleCloudMessaging.html

Unfortunately, this recent blog post (Sept. 2014) gives additional visibility to the deprecated demo API:

http://android-developers.blogspot.com/2014/09/conference-data-sync-gcm-google-io.html

We should update this implementation.

"Cursor finalized without prior close()" warning

Hello! First of all, thanks so much for an incredible project! I recently noticed that every so often during syncing and configuration changes, there will be a "Cursor finalized without prior close()" warning. It seems like the cursor doesn't always get closed in the "loadHashcodes" method for SpeakersHandler, VideosHandler, and ExpertsHandler.

cursor_warning

This app won't run unless you update Google Play services

device-2014-08-16-031551
device-2014-08-16-031610

When trying to run the app I m prompted to update the google play service , upon clicking on update I don't see any update option. The same thing happen on my Nexus4 which is not he case when I install the Google I/O app directly from play store.

How can this be fixed ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.