Git Product home page Git Product logo

io2015-codelabs's Introduction

Google I/O 2015 Codelabs

This repository contains the source material for codelabs released at Google I/O 2015. Access the codelabs.

io2015-codelabs's People

Contributors

broady avatar claywilkinson avatar freshp86 avatar hostirosti avatar keyboardsurfer avatar mangini avatar manomarks avatar markmcd avatar mco-gh avatar motss avatar nageshs avatar naokigoogle avatar samthor avatar samtstern 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

io2015-codelabs's Issues

Step 8 of 'Building a gRPC service with Node.js - incomplete command

The first time the student runs the node client the command is shown as below:

$ node client.js

In order to produce the result shown in the screenshot shown below:

{ books:
[ { id: 123,
title: 'A Tale of Two Cities',
author: 'Charles Dickens' } ] }

The command should be as follows:

$ node client.js list

service worker doesn't die like it's supposed to

Lab: Adding a Service Worker and Offline into your Web App
Step: 5. Build the starter app
"Kill the server and click reload in the browser. It should show you an error message."

This doesn't happen for me.
I kill the server and reload in the browser but it keeps working. No error message.
The horn keeps playing.
I tried deleting all the files and restarting chrome.
It still keeps working.
No error.

Might have something to do with problems killing the python server.
^C doesn't work right away.
Had to do it multiple times.
Something is continuing to run outside of the chrome process.
Isn't clear how to kill it.

Duplicate LOC in ViewController.m example

Line 3 is duplicated (first LOC only) in the lab manual - it should only be entered once

  1. Get the default GAITracker, and give it the value you set in the previous step
    id tracker = [[GAI sharedInstance] defaultTracker]; id tracker = [[GAI sharedInstance] defaultTracker];
    [tracker set:kGAIScreenName value:name];

Building GeoFences into your Android App - onResult

In Section 5 - Wrapping Up, "GeofenceErrorMessages" cannot be resolved.

} else {
// Get the status code for the error and log it using a user-friendly message.
String errorMessage = GeofenceErrorMessages.getErrorString(this,
status.getStatusCode());
}

There appear to be other errors as well:

  1. onResult returns "GEOFENCE_NOT_AVAILABLE" if Location Settings are in "Device only" Mode. It does add the Geofences if the Mode is set to "High accuracy" or "Battery Saving".
  2. I'm not getting any notifications, regardless of the Location mode settings.

Get Started with Android Pay: Minor typos

On Step 13. Request the Full Wallet, the sentence at the end of the page ends with a comma , which implies that there should be more text (or maybe it should be a period .)

On 16. Add a Payment Processor (Optional) this sentence uses the word "chare":

When you receive the FullWallet object, you can use the following code snippet to extract a token that you can use with the Stripe API to chare the customer:

more consistent and up-to-date project setup steps

Setup steps defined in the documentation are quite varying across the codelabs: sometime you clone the whole repository, sometimes only a zip archive of the particular codelab, etc.
The steps to open these in Android Studio are varying too: create a new project from existing sources and select the folder, or root build.gradle or settings.gradle.
To make it more clear to new users trying the codelabs, I think it would be better to choose one simple consistent method (and boilerplate) and have the same for all the codelabs.

Some examples of different setup steps:

Cardboard Unity - UIButton onClick not working on phone

Hi,

I encountered a problem with the UIButton (start and Cardboard Mode) when I deployed the app into my Android phone. In normal mode, the button is working fine, but when I change it to Cardboard mode, the button doesnt seem to work anymore. I press the trigger button or touch the screen does not have any effect thus making me stuck in the main menu in Cardboard mode. Any idea why?

The button works perfectly fine in preview when I run the scene from Unity.

Android Pay: Throws exception when trying to reuse card

Exception trace:

05-29 10:44:22.168  21772-21772/com.yourmom.androidpay E/AndroidRuntime﹕ FATAL EXCEPTION: main
    Process: com.yourmom.androidpay, PID: 21772
    java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=889, result=-1, data=Intent { (has extras) }} to activity {com.yourmom.androidpay/com.yourmom.androidpay.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'com.google.android.gms.wallet.ProxyCard com.google.android.gms.wallet.FullWallet.getProxyCard()' on a null object reference
            at android.app.ActivityThread.deliverResults(ActivityThread.java:3574)
            at android.app.ActivityThread.handleSendResult(ActivityThread.java:3617)
            at android.app.ActivityThread.access$1300(ActivityThread.java:151)
            at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1352)
            at android.os.Handler.dispatchMessage(Handler.java:102)
            at android.os.Looper.loop(Looper.java:135)
            at android.app.ActivityThread.main(ActivityThread.java:5254)
            at java.lang.reflect.Method.invoke(Native Method)
            at java.lang.reflect.Method.invoke(Method.java:372)
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
     Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'com.google.android.gms.wallet.ProxyCard com.google.android.gms.wallet.FullWallet.getProxyCard()' on a null object reference
            at com.yourmom.androidpay.MainActivity.onActivityResult(MainActivity.java:119)
            at android.app.Activity.dispatchActivityResult(Activity.java:6192)
            at android.app.ActivityThread.deliverResults(ActivityThread.java:3570)
            at android.app.ActivityThread.handleSendResult(ActivityThread.java:3617)
            at android.app.ActivityThread.access$1300(ActivityThread.java:151)
            at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1352)
            at android.os.Handler.dispatchMessage(Handler.java:102)
            at android.os.Looper.loop(Looper.java:135)
            at android.app.ActivityThread.main(ActivityThread.java:5254)
            at java.lang.reflect.Method.invoke(Native Method)
            at java.lang.reflect.Method.invoke(Method.java:372)
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)

Overflow Style for Y axis

I could not view the whole text on many of the steps. I had to hack the browser and add overflow style to the page.

Android Pay Codelab Incorrect

Step 8 . // Add the fragment to the UI
getSupportFragmentManager().beginTransaction()
.replace(R.id.wallet_button_holder, mWalletFragment, WALLET_FRAGMENT_ID)
.commit();

Since The Example does not create or extend a fragment this code errors

doesn;t mention the "public" directory

the "firebase init" provided a set of prompts, for which I accepted the defaults. One of them was something about setting up a "public" directory (public).

Following along in at the next step, we're told to create an index.html - but apparently it needs to be in public/.

Send data to Firebase
Here is a HTML index.html page we will start with:
...

firebase deploy
=== Deploying to 'resplendent-fire-2369'...
i deploying hosting
i preparing public directory for upload...
⚠ Warning: Public directory does not contain index.html
Error: Must have at least one file in public directory to deploy.

Unit and UI Testing

When running tests:

Error:Gradle: Execution failed for task ':app:validateDebugSigning'.

Unable to recreate missing debug keystore.

CardboardSDKforUnity Import Failed in Unity 5.2.x

In Unity 5.2.x, after importing the CardboardSDKforUnity, the Cardboard menu item is not getting created. It is also not working, when both 5.1.x and 5.2.x versions are installed on the system.

For now, quickly mention this in the codelab requirement. So that people won't try with latest Unity.

Unity-Cardboard tutorial errors

Step 4
_Add cardboard mode to the main menu scene_
Sometimes the Component > Cardboard menu is not present. Saving, closing Unity and reopening fixes it.

Step 5
_Handle VR pointing and clicking_
must check the "Vr Mode Only" checkbox (or the menu buttons flicker and are not selectable)

_Associate the click event with the script_
In the scene hierarchy, select the buttonCardboard object(under Canvas/Panel) ."

should refer to cardboardButton

Step 7
Need to add CardboardModeMgr script to Canvas so it starts in the right mode (and set the Main Camera on it). Otherwise it always starts in VR mode regardless of the PlayerPrefs.

Using NSMutableDictionary instead of NSDictionary

In lab manual "Add Analytics Code to your app", in part related with PatternViewController.m
the user creates NSMutableDictionary, where it's better to create immutable version (NSDictionary). The code with NSDictionary is compiled and works.
screen shot 2015-05-29 at 11 39 28 am

R.id.gridbackground

mBackground = (GridLayout) findViewById(R.id.gridbackground);

should be

mBackground = (GridLayout) findViewById(R.id.grid_background);

Building data-rich web apps with Lovefield - Link to the demo source code is missing in documentation

The page missing the documentation link:
https://io2015codelabs.appspot.com/codelabs/lovefield

Look for this at the bottom of Step 1:
"The StockAnalyzer skeleton code (instructions on downloading available at “Step 0”)."

There is no "Step 0" and there is no hint as to where to find the "StockAnalylzer skeleton code". When I search the GH repo (via the link to reporting bugs) I do see the zip file for this missing data file.
https://github.com/googlesamples/io2015-codelabs/blob/master/lovefield/stock_analyzer.zip

Typo in method name

In the Unit Testing code lab, in the calculator example, the method subtract is spelt "substract". The typo continues on to the generated testing code.

Remove [entire app] dialog is confusing

When I click on the red "X" in the topmost data item in my dashboard, I'm asked
Remove resplendent-fire-2369?
With a big red "Remove" button. The only sane interpretation of this is that I am trying to delete the entire app - not this single data item. Not encouraging!

Geofencing

Hello, for those using newer Android rolled out versions like API 23, I think that Android Studio environment has upgraded such that activity_main.xml in "Editing your Layout File" is now in file content_main.xml. For content_main.xml, it is now used to display user interface texts.

Web Animations Transitions: feature request

Hi guys,

Really appreciate the effort for creating this tutorial. I wish you could add more thorough explanations on the how-and-why some decisions are made.

I think that it would be very useful if you add some comments on every code snippet one has to add to follow the tutorial.

for example to explain this added styling:

  var bounds = link.getBoundingClientRect();
  effectNode.style.left = bounds.left + bounds.width / 2 + 'px';
  effectNode.style.top = bounds.top + bounds.height / 2 + 'px';

That would be great! Otherwise, I will also be happy to contribute...

Thanx!

Testing

Test issue for io15-codelabs repo.

Slide 9 of "Get Search Autocomplete from Deep Links" code lab.

Record a Page View End:

in the displayed sample code the super.onStop() call is dependent on recipe object. This can cause the activity lifecycle to be "broken" if a developer might make a mistake in his "recipe" object handling.
Should be moved outside the brackets.

cloud-nodejs: Use global-level configuration

In the cloud-nodejs codelab, we ask people to configure things twice with the same values (

var dataset = gcloud.datastore.dataset({
)

Might be worthwhile to do this at the parent level:

Old:

  var gcloud = require('gcloud');

  var dataset = gcloud.datastore.dataset({
    projectId: config.projectId,
    keyFilename: config.keyFilename
  });

  var storage = gcloud.storage({
    projectId: config.projectId,
    keyFilename: config.keyFilename
  });

New

  var gcloud = require('gcloud')({
    projectId: config.projectId,
    keyFilename: config.keyFilename
  });

  var dataset = gcloud.datastore.dataset();
  var storage = gcloud.storage();

Incorrect info about signup

"Use your preferred email or the provided user credentials to sign up for a free Firebase account"
I got a page telling me I had set up firebase using my @google.com identity, but when I went to run

firebase init
I got:
Error: Command requires authentication, please run firebase login

Android Pay Step 13: Missing semicolon

The first statement in the null check in the following block is missing a semicolon.

public void requestFullWallet(View view) {
      if (mMaskedWallet == null) {
        Toast.makeText(this, "No masked wallet, can't confirm", Toast.LENGTH_SHORT).show()
        return;
      } 
      Wallet.Payments.loadFullWallet(mGoogleApiClient,
          generateFullWalletRequest(mMaskedWallet.getGoogleTransactionId()),
          FULL_WALLET_REQUEST_CODE);
}

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.