1 00:00:00,000 --> 00:00:10,384 2 00:00:10,384 --> 00:00:12,050 CHRISTOPHER BARTHOLOMEW: Good afternoon. 3 00:00:12,050 --> 00:00:14,290 Thank you for coming to the Google Glass-- Breaking 4 00:00:14,290 --> 00:00:16,206 Through the Glass Ceiling session, or seminar. 5 00:00:16,206 --> 00:00:18,450 6 00:00:18,450 --> 00:00:24,070 This specific seminar isn't really based upon, like, coding examples. 7 00:00:24,070 --> 00:00:28,480 It's essentially when I taught this same-- 8 00:00:28,480 --> 00:00:32,220 or when I mentored students for CS50 last year on Google Glass projects, 9 00:00:32,220 --> 00:00:34,570 it wasn't the coding that really, really affected them. 10 00:00:34,570 --> 00:00:38,600 It was the, well, how do I take all these tools that Google has given me, 11 00:00:38,600 --> 00:00:42,310 and use them to build a specific application? 12 00:00:42,310 --> 00:00:43,810 We're going go over a couple things. 13 00:00:43,810 --> 00:00:45,130 We're going to go over design patterns. 14 00:00:45,130 --> 00:00:46,630 We're going to go over applications. 15 00:00:46,630 --> 00:00:53,540 We're going to go over exactly how to take all the knowledge that Google 16 00:00:53,540 --> 00:00:57,660 is going to give to you-- because Google is extraordinary in the sense of giving 17 00:00:57,660 --> 00:00:59,870 you all the samples you need. 18 00:00:59,870 --> 00:01:03,660 They're going to give you all the documentation you need to implement it. 19 00:01:03,660 --> 00:01:05,840 But we're going to use that knowledge that they've 20 00:01:05,840 --> 00:01:09,980 given you to create Glassware, Glass applications. 21 00:01:09,980 --> 00:01:12,125 So let's get started here. 22 00:01:12,125 --> 00:01:15,000 So a couple things that you should just keep in the back of your head 23 00:01:15,000 --> 00:01:19,890 whenever you're doing Google Glass applications. 24 00:01:19,890 --> 00:01:22,310 Because one of things about Google Glass in 25 00:01:22,310 --> 00:01:28,360 itself is that it's a controversial piece of technology 26 00:01:28,360 --> 00:01:31,154 that not many folks actually use. 27 00:01:31,154 --> 00:01:33,070 So in the back of your head, you should always 28 00:01:33,070 --> 00:01:36,800 think about-- the ultimate success of any wearable technology 29 00:01:36,800 --> 00:01:40,030 depends on the applications that are available for it. 30 00:01:40,030 --> 00:01:47,870 If there's no good applications for a specific device, then it's worthless. 31 00:01:47,870 --> 00:01:50,140 >> Another thing is as Glass developers, the challenge 32 00:01:50,140 --> 00:01:53,030 is to create apps that are more convenient and innovative 33 00:01:53,030 --> 00:01:55,080 than our own mobile device apps. 34 00:01:55,080 --> 00:01:58,010 And this doesn't actually mean that you have 35 00:01:58,010 --> 00:02:00,370 to create a whole brand new application. 36 00:02:00,370 --> 00:02:05,740 I mean for example, I can just simply go, OK Glass, take a picture, 37 00:02:05,740 --> 00:02:08,655 share with. 38 00:02:08,655 --> 00:02:10,770 And then I can just say, share. 39 00:02:10,770 --> 00:02:12,260 OK Glass. 40 00:02:12,260 --> 00:02:12,760 Share. 41 00:02:12,760 --> 00:02:16,500 42 00:02:16,500 --> 00:02:20,540 And I can share it to my circles just like that on Google+ or something. 43 00:02:20,540 --> 00:02:23,330 >> It's a lot quicker than me going out here, taking a picture, 44 00:02:23,330 --> 00:02:25,210 and then essentially doing the same thing. 45 00:02:25,210 --> 00:02:26,630 So it makes it more convenient. 46 00:02:26,630 --> 00:02:31,440 It's an innovative way to do things a little bit more quicker. 47 00:02:31,440 --> 00:02:34,660 >> Now, another way to think about a Google Glass application, 48 00:02:34,660 --> 00:02:37,830 or any type of wearable technology app, is that if you completely 49 00:02:37,830 --> 00:02:40,730 wiped your mobile device, what would be the first five 50 00:02:40,730 --> 00:02:44,319 applications that you would actually download, and why? 51 00:02:44,319 --> 00:02:46,110 So just keep those in the back of your head 52 00:02:46,110 --> 00:02:53,710 when you're going to start designing a Google Glass application. 53 00:02:53,710 --> 00:02:55,040 >> So what's the agenda? 54 00:02:55,040 --> 00:02:56,831 First thing that we're going to do is we're 55 00:02:56,831 --> 00:02:59,274 going to basically say, what is Glass? 56 00:02:59,274 --> 00:03:02,190 We're going to talk about the Glass timeline, basically the thing that 57 00:03:02,190 --> 00:03:06,797 moves across the screen when you use the controller along the side. 58 00:03:06,797 --> 00:03:09,130 We're going to talk about design patterns for Glassware. 59 00:03:09,130 --> 00:03:13,090 >> We're going to talk about mirror API versus the glass developer kit. 60 00:03:13,090 --> 00:03:14,890 I'll throw that around a lot, essentially, 61 00:03:14,890 --> 00:03:19,840 because the mirror API was the original application program 62 00:03:19,840 --> 00:03:22,210 interface that was released by Google. 63 00:03:22,210 --> 00:03:23,550 That's cloud based. 64 00:03:23,550 --> 00:03:26,080 Whereas the GDK, the Glass Development Kit, 65 00:03:26,080 --> 00:03:29,620 was released later down the road, essentially so that 66 00:03:29,620 --> 00:03:33,100 you can actually use the hardware capabilities in Google Glass. 67 00:03:33,100 --> 00:03:36,875 We'll go over some professional tips, and also, essentially, some resources. 68 00:03:36,875 --> 00:03:40,820 69 00:03:40,820 --> 00:03:44,120 >> So instead of explaining exactly what is Glass overall, 70 00:03:44,120 --> 00:03:45,870 I'm just going to use the one minute video 71 00:03:45,870 --> 00:03:48,520 that Google has provided to kind of go over it, 72 00:03:48,520 --> 00:03:54,800 because I think that's essentially the best way to do it without me giving 73 00:03:54,800 --> 00:03:56,240 Glass to every single person here. 74 00:03:56,240 --> 00:04:01,064 75 00:04:01,064 --> 00:04:01,730 [VIDEO PLAYBACK] 76 00:04:01,730 --> 00:04:05,340 -Here are the basics of how to use Glass. 77 00:04:05,340 --> 00:04:06,960 This is your touchpad. 78 00:04:06,960 --> 00:04:09,370 It runs from your temple to your ear. 79 00:04:09,370 --> 00:04:12,850 Tap the touchpad to wake up Glass. 80 00:04:12,850 --> 00:04:15,830 You should see the display above your line of sight. 81 00:04:15,830 --> 00:04:19,260 Adjust it to see everything. 82 00:04:19,260 --> 00:04:21,880 >> The home screen shows a clock. 83 00:04:21,880 --> 00:04:23,180 This is your timeline. 84 00:04:23,180 --> 00:04:24,740 It's a row of cards. 85 00:04:24,740 --> 00:04:27,710 Things to the left are happening now or coming up, 86 00:04:27,710 --> 00:04:32,280 like the weather, an upcoming flight, or an event in your calendar. 87 00:04:32,280 --> 00:04:35,110 You can tap on any card to see more. 88 00:04:35,110 --> 00:04:37,110 Swipe down anywhere to go back to the timeline. 89 00:04:37,110 --> 00:04:40,350 90 00:04:40,350 --> 00:04:43,340 >> Cards to the right of the home screen are from the past. 91 00:04:43,340 --> 00:04:47,930 For example, messages, videos, or photos. 92 00:04:47,930 --> 00:04:50,930 Tap on a photo to share it, and choose one of your friends. 93 00:04:50,930 --> 00:05:00,110 94 00:05:00,110 --> 00:05:01,930 Swipe down to go back to standby. 95 00:05:01,930 --> 00:05:03,855 And have fun exploring. 96 00:05:03,855 --> 00:05:07,172 >> [END VIDEO PLAYBACK] 97 00:05:07,172 --> 00:05:14,095 98 00:05:14,095 --> 00:05:16,220 CHRISTOPHER BARTHOLOMEW: So that's the generic user 99 00:05:16,220 --> 00:05:19,770 interface for Google Glass. 100 00:05:19,770 --> 00:05:26,610 Essentially, it's a very simple, timeline-focused UI 101 00:05:26,610 --> 00:05:30,010 that allows the user to use not only voice commands, but also 102 00:05:30,010 --> 00:05:34,270 this bar along the right-hand side to swipe really 103 00:05:34,270 --> 00:05:40,220 quickly through different specific dimensions of the different Glass time 104 00:05:40,220 --> 00:05:41,600 cards. 105 00:05:41,600 --> 00:05:43,100 >> So what's on Glass? 106 00:05:43,100 --> 00:05:45,870 Well, the display is 640 by 360. 107 00:05:45,870 --> 00:05:50,850 The camera in itself is a five megapixel camera that does 720p video recording. 108 00:05:50,850 --> 00:05:54,270 It has Wi-Fi and Bluetooth on it, but it does not have cellular. 109 00:05:54,270 --> 00:05:58,270 So in order use Glass outside of a Wi-Fi network, 110 00:05:58,270 --> 00:06:02,780 you'll have to essentially link it to your phone using a hotspot. 111 00:06:02,780 --> 00:06:05,180 >> The storage is about 12 gigabytes, and that's not 112 00:06:05,180 --> 00:06:06,790 including the operating system. 113 00:06:06,790 --> 00:06:10,590 It's 16 total essentially. 114 00:06:10,590 --> 00:06:14,160 It has two gigabytes of RAM. 115 00:06:14,160 --> 00:06:18,250 And there's some additional great pieces of technology that are built in. 116 00:06:18,250 --> 00:06:19,430 You have a gyroscope. 117 00:06:19,430 --> 00:06:21,430 You have an accelerometer. 118 00:06:21,430 --> 00:06:24,350 You have an ambient light sensing and proximity 119 00:06:24,350 --> 00:06:26,630 sensor, which is used for, like, blinking. 120 00:06:26,630 --> 00:06:30,910 For example, if I blink, it will take a picture, which is kind of strange. 121 00:06:30,910 --> 00:06:37,370 But it's one of those pieces that you can leverage inside of the SDK. 122 00:06:37,370 --> 00:06:43,190 >> And you also have a bone conduction audio transducer. 123 00:06:43,190 --> 00:06:47,350 So that allows me to really kind of whisper, OK Glass. 124 00:06:47,350 --> 00:06:51,910 And then it will access to my commands. 125 00:06:51,910 --> 00:06:57,050 So that overall is what Google Glass is. 126 00:06:57,050 --> 00:07:02,830 >> So let's get more into the nitty gritty of what these time cards are, 127 00:07:02,830 --> 00:07:06,050 and how we can use them to do different things. 128 00:07:06,050 --> 00:07:08,360 So there are three types of timeline cards. 129 00:07:08,360 --> 00:07:13,040 There's the static card, which displays text, HTML, images, and video. 130 00:07:13,040 --> 00:07:16,530 131 00:07:16,530 --> 00:07:19,870 These things can also be used to invoke these things called a live card, 132 00:07:19,870 --> 00:07:20,520 or immersions. 133 00:07:20,520 --> 00:07:23,730 And we'll talk about that in a little bit. 134 00:07:23,730 --> 00:07:27,940 >> A live card displays cards that are important at the current moment-- 135 00:07:27,940 --> 00:07:30,620 stuff that's rendered, essentially. 136 00:07:30,620 --> 00:07:33,410 Stopwatch is a good example for this. 137 00:07:33,410 --> 00:07:37,020 >> And an immersion displays what we call an Android activity that 138 00:07:37,020 --> 00:07:40,690 basically takes over the entire screen. 139 00:07:40,690 --> 00:07:45,940 So the idea here is you're able to make a lot of good, clean, crisp, 140 00:07:45,940 --> 00:07:51,580 and dynamic applications, whether it's just a simple HTML CSS 141 00:07:51,580 --> 00:07:54,910 template, whether something that's going on and active. 142 00:07:54,910 --> 00:08:00,350 This is an image of a game called Zombies Run, which 143 00:08:00,350 --> 00:08:01,900 is actually pretty fun. 144 00:08:01,900 --> 00:08:03,090 We'll look at that. 145 00:08:03,090 --> 00:08:12,052 And this is a game here that uses the gyroscope-- I keep saying gyroscope-- 146 00:08:12,052 --> 00:08:13,010 yeah, it is gyroscope . 147 00:08:13,010 --> 00:08:14,260 What am I doing? 148 00:08:14,260 --> 00:08:17,710 The gyroscope, so that you can actually balance things on your head. 149 00:08:17,710 --> 00:08:21,160 150 00:08:21,160 --> 00:08:23,580 >> So let's go more into timeline cards. 151 00:08:23,580 --> 00:08:27,440 Static cards can also contain a bundle of cards, for example, a photo album. 152 00:08:27,440 --> 00:08:32,400 You could see that denoted by this little page flap right here. 153 00:08:32,400 --> 00:08:37,059 When you tap into it, you're given another line of timeline cards. 154 00:08:37,059 --> 00:08:40,580 And there you'll be able to kind of scroll through using your scroll bar, 155 00:08:40,580 --> 00:08:42,805 and you'll also be able to share specific cards. 156 00:08:42,805 --> 00:08:48,397 157 00:08:48,397 --> 00:08:51,230 So now that you should be somewhat familiar with the different types 158 00:08:51,230 --> 00:08:53,529 of timeline cards, what we're going to do 159 00:08:53,529 --> 00:08:55,570 is we're going to talk about the design patterns. 160 00:08:55,570 --> 00:08:59,290 And this is probably the thing that most students get caught up 161 00:08:59,290 --> 00:09:03,590 with when they start diving into Google Glass development. 162 00:09:03,590 --> 00:09:05,170 >> So there are three design patterns. 163 00:09:05,170 --> 00:09:08,550 The first design pattern is periodic notifications. 164 00:09:08,550 --> 00:09:12,660 And what that does it uses the mirror API web services, or Android background 165 00:09:12,660 --> 00:09:15,960 services to push notifications onto a timeline. 166 00:09:15,960 --> 00:09:19,590 For example, if you sign up for cnn.com's app, 167 00:09:19,590 --> 00:09:26,520 they would send you a notification when there's a news event that had occurred. 168 00:09:26,520 --> 00:09:31,860 >> The mirror API can be used to create any language-- the mirror API can 169 00:09:31,860 --> 00:09:34,560 use any language to create a web service interaction. 170 00:09:34,560 --> 00:09:39,230 So essentially, like if you are not very familiar with Java, 171 00:09:39,230 --> 00:09:45,010 which is what the GDK uses, and you're more interested in PHP for example, 172 00:09:45,010 --> 00:09:49,080 you can write a PHP service and a Glassware application that 173 00:09:49,080 --> 00:09:51,090 interacts with that, as opposed to having 174 00:09:51,090 --> 00:09:55,520 to dive deeper into the Java parts of it. 175 00:09:55,520 --> 00:10:00,050 The Android background services uses Java per the Glass Development Kit. 176 00:10:00,050 --> 00:10:03,155 >> So what we'll do is we'll switch over to just an example on the Glass, 177 00:10:03,155 --> 00:10:03,800 if we could. 178 00:10:03,800 --> 00:10:07,486 179 00:10:07,486 --> 00:10:08,360 Sorry for the screen. 180 00:10:08,360 --> 00:10:11,340 It's tilted to the side here, for people who are inside. 181 00:10:11,340 --> 00:10:31,410 182 00:10:31,410 --> 00:10:31,930 There we go. 183 00:10:31,930 --> 00:10:33,110 Sorry about that. 184 00:10:33,110 --> 00:10:36,220 Takes a little bit to load here. 185 00:10:36,220 --> 00:10:40,090 >> So this is an example of something that The New York Times would send. 186 00:10:40,090 --> 00:10:43,780 It's a periodic notification that contains multiple static cards that 187 00:10:43,780 --> 00:10:45,670 has information about it. 188 00:10:45,670 --> 00:10:58,800 So if I click into it-- and this will load-- there we go. 189 00:10:58,800 --> 00:11:00,860 If I click into it, then what you'll get here 190 00:11:00,860 --> 00:11:04,890 is you'll get information about a headline or a story. 191 00:11:04,890 --> 00:11:08,235 You can also attach things to it so that you can actually read aloud. 192 00:11:08,235 --> 00:11:11,740 And what read aloud does is it will read it to you in your ear. 193 00:11:11,740 --> 00:11:14,080 You can't really hear it, but essentially it's 194 00:11:14,080 --> 00:11:17,730 a bone connector that will read in your head. 195 00:11:17,730 --> 00:11:19,590 This is the best way to put it. 196 00:11:19,590 --> 00:11:22,880 >> So that's what kind of periodic notifications are about. 197 00:11:22,880 --> 00:11:25,270 There's all different types of them. 198 00:11:25,270 --> 00:11:27,250 If you use Twitter, Twitter's another app 199 00:11:27,250 --> 00:11:29,760 that kind of gives you an example of what these periodic notification 200 00:11:29,760 --> 00:11:30,260 apps are. 201 00:11:30,260 --> 00:11:33,390 202 00:11:33,390 --> 00:11:38,400 >> The second design pattern-- and we'll go and go back to the thing. 203 00:11:38,400 --> 00:11:42,120 The second design pattern is the ongoing task. 204 00:11:42,120 --> 00:11:45,780 And essentially, this is a card that's constantly running in the background. 205 00:11:45,780 --> 00:11:46,780 You can leave the card. 206 00:11:46,780 --> 00:11:49,210 You can go do something else in the timeline. 207 00:11:49,210 --> 00:11:53,462 But essentially, what was happening is that it's always running. 208 00:11:53,462 --> 00:11:55,670 Something's always going on, like a real application, 209 00:11:55,670 --> 00:11:57,950 like a stopwatch for example. 210 00:11:57,950 --> 00:12:01,420 >> This can only be implemented using the Glass Developer Kit. 211 00:12:01,420 --> 00:12:05,150 But you can take full advantage of all of the Glass hardware. 212 00:12:05,150 --> 00:12:08,330 The Android GDK is Java only. 213 00:12:08,330 --> 00:12:11,260 So if you're familiar with Java, that's great. 214 00:12:11,260 --> 00:12:14,770 If you're familiar with Android development specifically, 215 00:12:14,770 --> 00:12:16,751 there's a great seminar, I believe. 216 00:12:16,751 --> 00:12:18,250 I'm not sure what the exact time is. 217 00:12:18,250 --> 00:12:21,080 But there's a seminar on Android development. 218 00:12:21,080 --> 00:12:24,220 If you are planning to do the GDK, I recommend going to that one 219 00:12:24,220 --> 00:12:26,389 specifically, because it's going to overlap 220 00:12:26,389 --> 00:12:28,180 exactly what you're going to use for Glass. 221 00:12:28,180 --> 00:12:31,080 222 00:12:31,080 --> 00:12:32,320 >> So let's see. 223 00:12:32,320 --> 00:12:34,020 Let's open up another app. 224 00:12:34,020 --> 00:12:37,020 Could we switch over to the thing? 225 00:12:37,020 --> 00:12:37,520 OK Glass. 226 00:12:37,520 --> 00:12:43,990 227 00:12:43,990 --> 00:12:44,490 Start a run. 228 00:12:44,490 --> 00:12:54,090 229 00:12:54,090 --> 00:12:58,610 So this is a game that I use when I'm bored when I go running, 230 00:12:58,610 --> 00:13:02,180 called Zombies Run. 231 00:13:02,180 --> 00:13:07,217 And essentially what it does is it tracks-- it's essentially, 232 00:13:07,217 --> 00:13:09,050 you're running from zombies the entire time. 233 00:13:09,050 --> 00:13:12,070 But it's like if I run-- I know this is going to be really awkward-- 234 00:13:12,070 --> 00:13:19,170 but if I run around here, it should track or give me a pace. 235 00:13:19,170 --> 00:13:23,530 It should update how far I've run, or things such as that. 236 00:13:23,530 --> 00:13:25,620 >> So this is like a-- this app is essentially-- 237 00:13:25,620 --> 00:13:28,620 it's taking a second to update on that side-- annoying. 238 00:13:28,620 --> 00:13:32,030 But essentially, what's going on here is that this is always running. 239 00:13:32,030 --> 00:13:33,470 And you're interacting with it. 240 00:13:33,470 --> 00:13:35,730 And you can just kind of do different things. 241 00:13:35,730 --> 00:13:37,460 And so there are many apps that are like. 242 00:13:37,460 --> 00:13:40,334 And there's apps that you can actually create that do the same thing. 243 00:13:40,334 --> 00:13:43,680 244 00:13:43,680 --> 00:13:44,460 So that's it. 245 00:13:44,460 --> 00:14:05,530 246 00:14:05,530 --> 00:14:06,750 >> All right. 247 00:14:06,750 --> 00:14:09,820 So the next design pattern is an immersion. 248 00:14:09,820 --> 00:14:13,465 Immersions will consume the entire screen and the entire timeline. 249 00:14:13,465 --> 00:14:17,800 So you actually can't just jump out and go do other things if you want to. 250 00:14:17,800 --> 00:14:21,270 It's like as if you're playing a game on Glass in itself. 251 00:14:21,270 --> 00:14:24,590 This can only be implemented using also the GDK. 252 00:14:24,590 --> 00:14:27,433 So once again, the advantages of using the GDK 253 00:14:27,433 --> 00:14:31,840 is that you basically take full advantage of all the hardware that's 254 00:14:31,840 --> 00:14:34,510 on Google Glass in itself. 255 00:14:34,510 --> 00:14:40,190 >> So we're going to go up to one more example on the Glass. 256 00:14:40,190 --> 00:14:42,050 OK Glass. 257 00:14:42,050 --> 00:14:46,930 Play a game of balance. 258 00:14:46,930 --> 00:14:52,287 So this is a game I like to play when I'm bored at work, just in a meeting. 259 00:14:52,287 --> 00:14:54,120 Hopefully it'll show up here any second now. 260 00:14:54,120 --> 00:14:58,220 261 00:14:58,220 --> 00:14:59,190 There we go. 262 00:14:59,190 --> 00:15:00,200 All right. 263 00:15:00,200 --> 00:15:03,290 So what it is is I'm using the JavaScript 264 00:15:03,290 --> 00:15:08,380 to balance these objects on my head, things like that. 265 00:15:08,380 --> 00:15:11,235 So this is kind of an immersion application. 266 00:15:11,235 --> 00:15:12,485 Level nine is like impossible. 267 00:15:12,485 --> 00:15:15,240 268 00:15:15,240 --> 00:15:15,940 >> OK, Glass. 269 00:15:15,940 --> 00:15:20,240 There's also interactive game that you can do, like-- not record a video. 270 00:15:20,240 --> 00:15:32,720 271 00:15:32,720 --> 00:15:35,290 Stop recording. 272 00:15:35,290 --> 00:15:36,910 Why are you recording? 273 00:15:36,910 --> 00:15:37,970 Sorry. 274 00:15:37,970 --> 00:15:41,830 Glass is acting up. 275 00:15:41,830 --> 00:15:42,520 OK, Glass. 276 00:15:42,520 --> 00:15:51,790 277 00:15:51,790 --> 00:15:53,470 OK, Glass. 278 00:15:53,470 --> 00:15:59,379 Play a game of Clay Shooter. 279 00:15:59,379 --> 00:16:01,670 So this is another one of those weird interactive games 280 00:16:01,670 --> 00:16:04,080 that you can mess around with. 281 00:16:04,080 --> 00:16:07,630 This uses a lot of components inside of Google Glass. 282 00:16:07,630 --> 00:16:09,480 Fire. 283 00:16:09,480 --> 00:16:09,980 Fire. 284 00:16:09,980 --> 00:16:11,650 I'm horrible at this game. 285 00:16:11,650 --> 00:16:16,290 And essentially, you can just use the word fire to actually go out and fire. 286 00:16:16,290 --> 00:16:17,000 Fire. 287 00:16:17,000 --> 00:16:18,420 Oh, it's never going to happen. 288 00:16:18,420 --> 00:16:21,670 I'm going to miss it every time. 289 00:16:21,670 --> 00:16:23,554 But it kind of gives you more of an example 290 00:16:23,554 --> 00:16:26,220 of using all the different components to make these Glass games. 291 00:16:26,220 --> 00:16:32,719 292 00:16:32,719 --> 00:16:34,635 So the next thing you want to think about here 293 00:16:34,635 --> 00:16:40,090 is invocation methods, a fancy term for, how do I start my application? 294 00:16:40,090 --> 00:16:44,740 So there are different ways to leverage different invocation methods. 295 00:16:44,740 --> 00:16:48,840 Different design patterns, for example the periodic notifications, 296 00:16:48,840 --> 00:16:51,150 those won't use the OK, Glass menu. 297 00:16:51,150 --> 00:16:54,050 So if you're wanting to do something that had and sent notifications, 298 00:16:54,050 --> 00:16:59,201 say you have an application that reminds you about something that's happened, 299 00:16:59,201 --> 00:17:01,950 you're not going to be able to bring that up using the Glass menu. 300 00:17:01,950 --> 00:17:04,260 That's only something that you'll be able to do 301 00:17:04,260 --> 00:17:05,614 through the Glass GDK in itself. 302 00:17:05,614 --> 00:17:10,270 303 00:17:10,270 --> 00:17:14,900 >> So I've been using these two terms, mirror API and Glass GDK. 304 00:17:14,900 --> 00:17:18,569 And so I'm going to go into those a little bit more deeper. 305 00:17:18,569 --> 00:17:21,730 So before the GDK, mirror was used primarily 306 00:17:21,730 --> 00:17:24,530 as the application interaction. 307 00:17:24,530 --> 00:17:26,980 It uses backend web services to accomplish 308 00:17:26,980 --> 00:17:29,880 simple tasks, such as timeline subscriptions, content sharing, 309 00:17:29,880 --> 00:17:31,390 and voice text. 310 00:17:31,390 --> 00:17:35,370 Glassware using the mirror API can be written in almost any language. 311 00:17:35,370 --> 00:17:38,130 Glassware that only uses mirror API will not 312 00:17:38,130 --> 00:17:41,130 have the ability to use voice invocation methods, 313 00:17:41,130 --> 00:17:45,770 nor the hardware goodies such as the gyroscope and accelerometer. 314 00:17:45,770 --> 00:17:48,670 >> You can create Glassware without a physical device in hand. 315 00:17:48,670 --> 00:17:49,680 So that is a nice thing. 316 00:17:49,680 --> 00:17:54,280 So if you need to just create Glassware that you don't really 317 00:17:54,280 --> 00:17:56,850 need the actual device, you can do that, especially 318 00:17:56,850 --> 00:18:00,900 if it's hard to get an actual Google Glass, or if you don't have one, 319 00:18:00,900 --> 00:18:02,940 or something of this sort. 320 00:18:02,940 --> 00:18:05,690 It requires knowledge of oAuth2. 321 00:18:05,690 --> 00:18:08,789 And what open authentication is if you ever 322 00:18:08,789 --> 00:18:11,080 go onto a website that says sign in with your Facebook, 323 00:18:11,080 --> 00:18:14,930 or sign in with your Google account, things like that, that's Open Auth. 324 00:18:14,930 --> 00:18:19,330 And that is essentially going to be used because the mirror API is a cloud 325 00:18:19,330 --> 00:18:22,050 service. 326 00:18:22,050 --> 00:18:25,470 >> As for the GDK, the Glass Developer Kit is, in essence, 327 00:18:25,470 --> 00:18:28,000 an extension to Android development. 328 00:18:28,000 --> 00:18:30,020 It can only be used with Java. 329 00:18:30,020 --> 00:18:32,640 Developers have full though to all the native hardware 330 00:18:32,640 --> 00:18:35,790 features, including the gyroscope and accelerometer. 331 00:18:35,790 --> 00:18:38,290 It's primarily used for voice invocation abilities, 332 00:18:38,290 --> 00:18:42,700 as you saw-- OK, Glass, that whole menu thing-- 333 00:18:42,700 --> 00:18:46,726 live cards, and immersive applications. 334 00:18:46,726 --> 00:18:48,850 This does require that you have the device in hand, 335 00:18:48,850 --> 00:18:52,700 because you always have to be constantly loading the code up to your Glass 336 00:18:52,700 --> 00:18:53,577 to test with. 337 00:18:53,577 --> 00:18:56,200 338 00:18:56,200 --> 00:19:00,180 >> So GDK versus mirror. 339 00:19:00,180 --> 00:19:03,720 The pros are that its straightforward for Android developers, 340 00:19:03,720 --> 00:19:05,230 beginner or professional. 341 00:19:05,230 --> 00:19:07,720 You've got the ability to use all the native hardware. 342 00:19:07,720 --> 00:19:09,580 It opens the door for interactive Glassware, 343 00:19:09,580 --> 00:19:12,370 offline functionality where you don't need the internet, 344 00:19:12,370 --> 00:19:13,970 and lots of documentation. 345 00:19:13,970 --> 00:19:16,640 So it's well documented. 346 00:19:16,640 --> 00:19:20,250 >> The cons are that it's only available in one language, Java. 347 00:19:20,250 --> 00:19:23,370 And the integrated development set up can take actually a pretty long time 348 00:19:23,370 --> 00:19:23,870 to do. 349 00:19:23,870 --> 00:19:26,771 When I say long time, and I mean like maybe a couple hours to get it 350 00:19:26,771 --> 00:19:27,395 all configured. 351 00:19:27,395 --> 00:19:30,009 352 00:19:30,009 --> 00:19:31,800 There are a lot of things, too, you'll have 353 00:19:31,800 --> 00:19:34,920 to consider like battery life and memory usage. 354 00:19:34,920 --> 00:19:38,535 I mean, I was at 100% when I started this presentation. 355 00:19:38,535 --> 00:19:41,640 356 00:19:41,640 --> 00:19:44,110 And I dropped 20% already. 357 00:19:44,110 --> 00:19:48,820 >> So depending on the apps that you use, and depending on what your app actually 358 00:19:48,820 --> 00:19:54,130 does, you want to think about, OK, what can I do with the most minimal battery 359 00:19:54,130 --> 00:19:54,890 life consumption? 360 00:19:54,890 --> 00:19:59,308 So those are the important things when you start using all those goodies. 361 00:19:59,308 --> 00:20:02,620 >> In terms of the mirror API, you can pretty much 362 00:20:02,620 --> 00:20:04,740 use almost any language that has a web framework. 363 00:20:04,740 --> 00:20:10,170 You can't use C, but for example, you can use PHP, Java, Python, Ruby, 364 00:20:10,170 --> 00:20:14,550 Go, other different languages. 365 00:20:14,550 --> 00:20:18,770 And the cool thing is it just uses straightforward web architecture. 366 00:20:18,770 --> 00:20:19,980 You make a post request. 367 00:20:19,980 --> 00:20:21,350 It inserts a card. 368 00:20:21,350 --> 00:20:22,850 You make a get request. 369 00:20:22,850 --> 00:20:24,750 It gets cards. 370 00:20:24,750 --> 00:20:27,960 >> The cons is that you do need the OAuth2 knowledge, i.e. the sign 371 00:20:27,960 --> 00:20:29,360 in with your Google account. 372 00:20:29,360 --> 00:20:33,560 And that can be sometimes confusing for folks. 373 00:20:33,560 --> 00:20:37,477 I believe that when the seminars are posted that not only the slides, 374 00:20:37,477 --> 00:20:39,310 but some other materials are attached to it. 375 00:20:39,310 --> 00:20:40,300 Is that correct? 376 00:20:40,300 --> 00:20:43,500 And I have a big PDF, like a nine page PDF, 377 00:20:43,500 --> 00:20:45,550 on how to set all that up for people. 378 00:20:45,550 --> 00:20:48,790 And it gives you an idea of like a database structure 379 00:20:48,790 --> 00:20:51,520 to hold the keys and the tokens. 380 00:20:51,520 --> 00:20:58,090 So I'll hopefully be able to shed some light on the OAuth 381 00:20:58,090 --> 00:21:01,550 with going into that document a little bit further. 382 00:21:01,550 --> 00:21:05,140 >> One of the things that is a big con is that there's no offline functionality. 383 00:21:05,140 --> 00:21:09,294 You do need internet access. 384 00:21:09,294 --> 00:21:10,850 If you can't decide, don't worry. 385 00:21:10,850 --> 00:21:12,560 You can use both. 386 00:21:12,560 --> 00:21:17,620 For example, let's say you create a game using the immersion via the GDK. 387 00:21:17,620 --> 00:21:20,390 You could also create a leaderboard that's in the cloud. 388 00:21:20,390 --> 00:21:24,510 Using the mirror API, you can send your score to your leaderboard web service, 389 00:21:24,510 --> 00:21:26,320 so it can be displayed. 390 00:21:26,320 --> 00:21:29,840 >> So you essentially want to use what's best for your application type. 391 00:21:29,840 --> 00:21:33,930 Not necessarily-- you don't have to go to one side or the other. 392 00:21:33,930 --> 00:21:37,950 It's just that one's going to be-- if you're going to use both, 393 00:21:37,950 --> 00:21:39,350 you might have a need for that. 394 00:21:39,350 --> 00:21:40,850 And it is a lot of work. 395 00:21:40,850 --> 00:21:43,610 But it's definitely worth it if you can get it through. 396 00:21:43,610 --> 00:21:47,850 397 00:21:47,850 --> 00:21:55,530 >> So I'll give you a quick example of the mirror API and its capabilities. 398 00:21:55,530 --> 00:21:58,220 So for example, one of the things that-- this 399 00:21:58,220 --> 00:22:03,930 is the Glass starter project that comes with the Google samples. 400 00:22:03,930 --> 00:22:05,700 It basically lays out everything that you 401 00:22:05,700 --> 00:22:08,900 can do with at least the mirror API. 402 00:22:08,900 --> 00:22:11,440 >> Some of the stuff that I had shown you earlier as well, 403 00:22:11,440 --> 00:22:14,365 for example, the game, the balance game and those, 404 00:22:14,365 --> 00:22:18,735 those are actually sample code that Google provides you. 405 00:22:18,735 --> 00:22:24,375 So you see, Google has done a lot of the work for you. 406 00:22:24,375 --> 00:22:27,570 You just need to basically figure out exactly how 407 00:22:27,570 --> 00:22:31,480 to put your application together to better utilize 408 00:22:31,480 --> 00:22:34,200 those tools and those things that they've given you. 409 00:22:34,200 --> 00:22:36,810 >> This is the sample for the timeline. 410 00:22:36,810 --> 00:22:41,970 But what we can do here is, the code behind on this, 411 00:22:41,970 --> 00:22:45,010 is you can see exactly how they insert a message into a timeline, 412 00:22:45,010 --> 00:22:49,730 or insert a picture, or insert a card with paginated HTML. 413 00:22:49,730 --> 00:22:53,620 Subscriptions-- a subscription is something that you subscribe to. 414 00:22:53,620 --> 00:22:55,880 For example, I subscribe to The New York Times. 415 00:22:55,880 --> 00:23:01,600 And so they send my Glass, my specific Glass, updates periodically. 416 00:23:01,600 --> 00:23:04,250 That's what really the mirror API is. 417 00:23:04,250 --> 00:23:08,820 And on the Glass developer website, they have all this here for you, 418 00:23:08,820 --> 00:23:12,510 so that you can basically leverage this. 419 00:23:12,510 --> 00:23:15,680 >> So one of the other things that I wish I had 420 00:23:15,680 --> 00:23:19,165 when I was developing Glass applications before, and also my students last year, 421 00:23:19,165 --> 00:23:20,540 is this cool thing. 422 00:23:20,540 --> 00:23:22,980 And it's called the Glassware flow designer. 423 00:23:22,980 --> 00:23:26,860 And the Glassware flow designer is basically a way for you 424 00:23:26,860 --> 00:23:29,990 to build a Google Glass application, so that you can actually 425 00:23:29,990 --> 00:23:31,890 see what's going on. 426 00:23:31,890 --> 00:23:36,450 >> So I built this kind of temporary Google Glass application here. 427 00:23:36,450 --> 00:23:37,710 OK, Glass. 428 00:23:37,710 --> 00:23:40,850 And then I want it to do something. 429 00:23:40,850 --> 00:23:43,430 Launch a CS50 app. 430 00:23:43,430 --> 00:23:46,070 And then it'll say, welcome to my CS50 app. 431 00:23:46,070 --> 00:23:49,490 And then I can tap, as you can see here, for more options. 432 00:23:49,490 --> 00:23:54,650 And one, I can either do an automatic A plus, or I can write my PSET for me. 433 00:23:54,650 --> 00:23:57,390 So there's different things. 434 00:23:57,390 --> 00:24:01,810 If you use the write my PSET option, it says, warning, not recommended. 435 00:24:01,810 --> 00:24:04,820 Don't want Glass to write your PSET for you. 436 00:24:04,820 --> 00:24:12,010 >> But essentially, this is a nice tool that a lot of people have missed. 437 00:24:12,010 --> 00:24:15,730 And it would be great if you can help lay out 438 00:24:15,730 --> 00:24:19,260 your application in one of these items. 439 00:24:19,260 --> 00:24:23,020 And the cool thing too is that there's this design review button. 440 00:24:23,020 --> 00:24:25,330 And what this design review button does, essentially, 441 00:24:25,330 --> 00:24:29,580 is it allows the actual Google Glass team to review your app 442 00:24:29,580 --> 00:24:31,940 and give you comments on it beforehand. 443 00:24:31,940 --> 00:24:38,430 So a lot of cool features that the Glass team has done in order to build it, 444 00:24:38,430 --> 00:24:41,890 to make it as easy as possible for you to actually write Google Glass 445 00:24:41,890 --> 00:24:43,276 applications. 446 00:24:43,276 --> 00:24:43,776 Yeah? 447 00:24:43,776 --> 00:24:45,734 >> SPEAKER 1: Is this only design, or can you then 448 00:24:45,734 --> 00:24:49,966 translate this-- does this automatically translate into code that you can use? 449 00:24:49,966 --> 00:24:53,090 CHRISTOPHER BARTHOLOMEW: So the question was that, is this only for design, 450 00:24:53,090 --> 00:24:55,555 and does it translate into the actual code for you? 451 00:24:55,555 --> 00:24:56,540 No, it doesn't. 452 00:24:56,540 --> 00:24:59,740 But what it does is it does beat a giant white board and tons 453 00:24:59,740 --> 00:25:01,870 of white pieces of paper. 454 00:25:01,870 --> 00:25:06,020 So you know exactly once you apply a specific card, 455 00:25:06,020 --> 00:25:08,860 you know it will apply-- when you're writing your program, 456 00:25:08,860 --> 00:25:13,990 oh, I want this specific card to actually launch something else. 457 00:25:13,990 --> 00:25:15,770 And so it lays it out very nicely. 458 00:25:15,770 --> 00:25:20,007 And if you are planning to do a Google Glass application 459 00:25:20,007 --> 00:25:23,090 and you do one of these, I would submit one of these as your pre-proposal. 460 00:25:23,090 --> 00:25:26,130 And I'm sure your TF will be really happy about that, because they'll 461 00:25:26,130 --> 00:25:28,088 be like, oh this is what your application does. 462 00:25:28,088 --> 00:25:29,700 I know what I'm expecting from it. 463 00:25:29,700 --> 00:25:31,491 Because sometimes, it's really hard to keep 464 00:25:31,491 --> 00:25:33,240 track of what's going on in a Glass app. 465 00:25:33,240 --> 00:25:38,290 466 00:25:38,290 --> 00:25:41,570 >> Let's go back to this. 467 00:25:41,570 --> 00:25:44,245 Another cool thing is the utilize of the Glassware playground 468 00:25:44,245 --> 00:25:48,300 to review and create content that is displaying on your application. 469 00:25:48,300 --> 00:25:57,800 So what that is is a tool where you can actually design how things look. 470 00:25:57,800 --> 00:26:04,470 So for example, if I want to make-- waiting for it to load here. 471 00:26:04,470 --> 00:26:14,230 472 00:26:14,230 --> 00:26:17,940 >> If I want to make a specific template, I can 473 00:26:17,940 --> 00:26:22,370 do that here using this, essentially a tool 474 00:26:22,370 --> 00:26:25,460 that they've given us, to really customize 475 00:26:25,460 --> 00:26:30,520 how your actual cards are going to look. 476 00:26:30,520 --> 00:26:32,540 Hello. 477 00:26:32,540 --> 00:26:36,610 This is great. 478 00:26:36,610 --> 00:26:38,480 Thanks, Google. 479 00:26:38,480 --> 00:26:40,820 So you can actually see how your cards are 480 00:26:40,820 --> 00:26:42,642 going to look when you start building them 481 00:26:42,642 --> 00:26:44,850 and then you start sending them over to Google Glass. 482 00:26:44,850 --> 00:26:52,040 483 00:26:52,040 --> 00:26:55,010 >> The next thing is this PDF handout that I've 484 00:26:55,010 --> 00:26:58,000 created in order-- if you were going to do notification 485 00:26:58,000 --> 00:27:03,140 services, periodic notifications, or work with the mirror API as opposed 486 00:27:03,140 --> 00:27:05,490 to the GDK. 487 00:27:05,490 --> 00:27:07,870 And let me get that out for you. 488 00:27:07,870 --> 00:27:36,830 489 00:27:36,830 --> 00:27:39,415 >> Taking a bit to load here, sorry. 490 00:27:39,415 --> 00:27:43,510 Supposed to be already open. 491 00:27:43,510 --> 00:27:44,010 There we go. 492 00:27:44,010 --> 00:27:46,640 493 00:27:46,640 --> 00:27:53,560 >> So for example, if you want to set up using the mirror API, 494 00:27:53,560 --> 00:27:57,340 I have full detailed instructions on how to do that-- how 495 00:27:57,340 --> 00:28:01,780 you access the Google's API console, with what account, 496 00:28:01,780 --> 00:28:06,150 how to create a specific-- enabling the mirror API, 497 00:28:06,150 --> 00:28:09,190 working with open authentication, and also 498 00:28:09,190 --> 00:28:13,260 how to use the playground that we just specifically looked at. 499 00:28:13,260 --> 00:28:19,440 So good information here that will come with the actual slide deck. 500 00:28:19,440 --> 00:28:22,520 >> Otherwise, you can also do other things here, 501 00:28:22,520 --> 00:28:30,050 and specifically there's the database structure that I've created, 502 00:28:30,050 --> 00:28:32,820 or that I've done for you, that you can look at 503 00:28:32,820 --> 00:28:38,030 to see how to build an open authentication table for users. 504 00:28:38,030 --> 00:28:41,079 So something to also understand ad keep track of, 505 00:28:41,079 --> 00:28:43,620 especially if you're going to be working with the mirror API. 506 00:28:43,620 --> 00:28:55,800 507 00:28:55,800 --> 00:28:56,400 There you are. 508 00:28:56,400 --> 00:29:02,530 509 00:29:02,530 --> 00:29:05,640 >> So, a ton of resources. 510 00:29:05,640 --> 00:29:10,540 What I recommend doing is going to developers.google.com/glass and read, 511 00:29:10,540 --> 00:29:14,150 because there's a lot of information there, 512 00:29:14,150 --> 00:29:17,720 far too much to go over the entire seminar. 513 00:29:17,720 --> 00:29:21,220 But there's a lot information, that's a lot of good information, that kind of 514 00:29:21,220 --> 00:29:24,640 expands more on this, especially on the code side of things. 515 00:29:24,640 --> 00:29:27,630 I've also added a quick start guide for the GDK, 516 00:29:27,630 --> 00:29:30,600 so that if you need to kind of jump into it, 517 00:29:30,600 --> 00:29:32,770 you have the ability to do that as well. 518 00:29:32,770 --> 00:29:36,290 >> I've added-- there's video right here, Android Tutorials. 519 00:29:36,290 --> 00:29:38,630 There's a YouTube video that's included, that if you 520 00:29:38,630 --> 00:29:42,920 want to start developing using the Android operating system, 521 00:29:42,920 --> 00:29:46,630 if you're a beginner, that video will really help you do that. 522 00:29:46,630 --> 00:29:51,170 Again, the Glass applications that are using the GDK 523 00:29:51,170 --> 00:29:53,000 are literally just Android applications. 524 00:29:53,000 --> 00:29:56,090 They can port back and forth. 525 00:29:56,090 --> 00:29:58,740 >> Finally I've added a Google style guide for Java. 526 00:29:58,740 --> 00:30:02,090 If there's anything specifically-- How do I do a-- you know, 527 00:30:02,090 --> 00:30:05,830 what's the best way to do a for loop, in terms of Google? 528 00:30:05,830 --> 00:30:10,230 That style guide will help you do those things. 529 00:30:10,230 --> 00:30:11,550 >> And that's it. 530 00:30:11,550 --> 00:30:13,990 So I hope you guys have enough information 531 00:30:13,990 --> 00:30:17,760 to go forward with jumping into a Google Glass application. 532 00:30:17,760 --> 00:30:19,590 But definitely visit the resources. 533 00:30:19,590 --> 00:30:24,930 Definitely dive into the different types of applications that are available, 534 00:30:24,930 --> 00:30:26,610 especially the sample applications. 535 00:30:26,610 --> 00:30:28,810 Look at some of the code that they provided you. 536 00:30:28,810 --> 00:30:32,770 And honestly, with your experience in CS50, 537 00:30:32,770 --> 00:30:35,850 it should not be a difficult thing to break into and get in. 538 00:30:35,850 --> 00:30:36,750 OK? 539 00:30:36,750 --> 00:30:38,600 Thank you. 540 00:30:38,600 --> 00:30:40,598