1 00:00:00,000 --> 00:00:04,689 [MUSIC] 2 00:00:04,689 --> 00:00:06,210 Hello, everyone. 3 00:00:06,210 --> 00:00:09,950 My name is Michael Lustig and in this workshop we're going to create a realtime 4 00:00:09,950 --> 00:00:13,330 messaging app using the Firebase Realtime Database. 5 00:00:13,330 --> 00:00:16,860 If you're curious about what exactly Firebase is in depth and what other 6 00:00:16,860 --> 00:00:20,939 features Firebase offers please check out the workshop linked in the teachers notes. 7 00:00:22,180 --> 00:00:25,480 In this particular workshop, we're going to focus on using FireBase 8 00:00:25,480 --> 00:00:29,550 in an Android application, rather than going over its entire feature set. 9 00:00:29,550 --> 00:00:33,750 As I mentioned, we'll be creating a real time messaging application for Android. 10 00:00:33,750 --> 00:00:35,810 In the app, you'll be able to create a username, 11 00:00:35,810 --> 00:00:39,020 and then send messages to everyone else that has your app installed. 12 00:00:40,380 --> 00:00:44,240 Since you'll be creating your own FireBase project, on the FireBase console. 13 00:00:44,240 --> 00:00:48,235 You'll only see the messages from the people that you've shared your app with. 14 00:00:48,235 --> 00:00:49,007 In other words, 15 00:00:49,007 --> 00:00:52,500 you won't see the messages from everyone who goes through this workshop. 16 00:00:52,500 --> 00:00:55,330 That would certainly be possible, but 17 00:00:55,330 --> 00:00:58,090 we thought that might scale way out of hand too quickly. 18 00:00:59,250 --> 00:01:00,320 When I'm learning, 19 00:01:00,320 --> 00:01:04,100 I like to see what the finished product will look like before I get started. 20 00:01:04,100 --> 00:01:07,150 That helps to give me a clear view on the end goal of what the lesson's 21 00:01:07,150 --> 00:01:08,390 going to teach. 22 00:01:08,390 --> 00:01:11,130 So let's go ahead and check out the app in action. 23 00:01:12,240 --> 00:01:15,490 As you can see, when I first install the app I need to create a username. 24 00:01:15,490 --> 00:01:19,670 In this workshop, we don't perform any logic for verifying usernames, but 25 00:01:19,670 --> 00:01:21,730 try to pick something unique to you. 26 00:01:21,730 --> 00:01:25,020 Firebase provides great user authentication but in this workshop, 27 00:01:25,020 --> 00:01:28,530 we're going to stick with just learning about the real time database capabilities. 28 00:01:28,530 --> 00:01:31,440 Stay tuned for workshops covering Firebase's other great features. 29 00:01:33,370 --> 00:01:34,650 Once I've chosen the username, 30 00:01:34,650 --> 00:01:37,409 I can log in where I'm taking the screen full of messages. 31 00:01:38,570 --> 00:01:41,750 I'll bring up another emulator to show you how cool this truly is. 32 00:01:41,750 --> 00:01:44,810 As well as my Firebase console open to the database page so 33 00:01:44,810 --> 00:01:48,300 that you can see that all of this is truly happening in real time. 34 00:01:48,300 --> 00:01:50,190 I've already logged in on this other emulator. 35 00:01:50,190 --> 00:01:53,740 So once I send a message it should almost instantly appear in both the Firebase 36 00:01:53,740 --> 00:01:57,290 console as well as on the list of messages on both emulators. 37 00:01:57,290 --> 00:01:59,160 Let's go ahead and give that a try. 38 00:01:59,160 --> 00:02:03,340 I'll type a message, Treehouse is super rad, and click the send button. 39 00:02:08,630 --> 00:02:11,840 Viola, the messages appear on both the emulators and 40 00:02:11,840 --> 00:02:16,340 our database flashes green I know that this app is fairly simple. 41 00:02:16,340 --> 00:02:20,060 But every time I use Firebase, I'm amazed by how much complexity they've alleviated 42 00:02:20,060 --> 00:02:23,620 by handling all of the issues that arise from an app with a real time requirement. 43 00:02:23,620 --> 00:02:26,990 Now that you've got a better idea of exactly the project that you'll be 44 00:02:26,990 --> 00:02:28,320 creating in the workshop. 45 00:02:28,320 --> 00:02:30,810 I'm going to show you how to set up the starter files on your machine to 46 00:02:30,810 --> 00:02:32,050 follow along. 47 00:02:32,050 --> 00:02:35,340 While it isn't vital that you follow along, writing the code along with me will 48 00:02:35,340 --> 00:02:37,880 be the best way to truly understand how everything works