Skip to content

yaleinteractive/glass-hello

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

  1. In your Cloud9 workspace, open config.json.
  2. Update the “host” to https://glass-hello-danmichaelson.c9.io but replace glass-hello with your Cloud9 project name (usually your GitHub repo name), and danmichaelson with your Cloud9 user name (usually your GitHub username). Note that underscores in Cloud9 project names / GitHub repo names, are problematic.
  3. Update the “displayName” to the name of your project.
  4. Update the “id” to the name of your project in all lowercase with no punctuation.
  5. Optionally update the “contactIcon” to the URL of an image (the user sees this when she shares to your project).
  6. Open package.json and update the name or your app, description of your app, and your email address.
  7. Go to https://console.developers.google.com/project
  8. Log in as your own Gmail address
  9. Create a project. Name it the title of your class project.
  10. On the left, go to APIs & auth → APIs
  11. Under Browse APIs, filter to “mirror”
  12. Click Google Mirror API
  13. Turn it On
  14. On the left, go to APIs & auth → Credentials
  15. Click Create new Client ID
  16. Select Web application and click Configure consent screen
  17. Select your email address, enter our project title under Product Name, and click Save
  18. Back under Create Client ID: Under Authorized JavaScript origins, add two lines:
    i. The “host” from step 2.
    ii. https://mirror-api-playground.appspot.com
  19. Under Authorized Redirect URIs, make sure that the following was automatically added: https://glass-hello-danmichaelson.c9.io/oauth2callback (but replace glass-hello-danmichaelson.c9.io with your host info) If not, carefully add it yourself.
  20. Click Create Client ID
  21. On the next screen, Copy the Client ID and paste it into the appropriate field in config.json in your Cloud9 workspace.
  22. Do the same for Client Secret.
  23. In Cloud9, open server.js and click Run
  24. Select the URL that appears in the output panel (e.g. https://glass-hello-danmichaelson.c9.io). Press Cmd-C to copy, and paste it into a new browser tab. (Clicking to open within Cloud9 won’t work in this case.)
  25. Click the “Get it on Glass” button that appears in the browser.
  26. In this case you must authenticate using the Google account “[email protected]”. This installs your app on our Glass.
  27. Close the browser tab with “Application successfully authorized!”

In the output for server.js, you should notice that the card was updated. You can see the card in the Google Glass, and you can also see it in the Playground.

To see the card in the Playground, go to https://developers.google.com/glass/tools-downloads/playground . Paste the Client ID next to Authorize and click Authorize. Be sure to log in as [email protected] .

Then find the card from your app under the Timeline tab. Note that clicking "Update" does not refresh the card from your timeline. Instead it pushes the card (with any HTML you've edited in the Playground) back to your timeline. To refresh from your timeline, reload the Playground page and authorize again.

Unfortunately the Playground does not fully support menu items in cards; for these you have to use the Glass itself.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published