All right. So we're gonna go ahead and walk through the VOIP code, the VOIP app code that we wrote up. And let's get started. This might be a little long, so sit tight. And let's go ahead and begin. All right, so right here, we just wrote everything in one signal activity. The VOIP activity. It's not the best coding practice so maybe someone can, or you guys can improve it by implementing some kind of design pattern, something like that. Oh yeah, like I mentioned, the app's pretty bare bones. So what we have here, and you guys see it later on, is this key is sort of like an authorization password, where since we have our username, domain and password all hard coded into the program so it'll automatically log you in as that user, every time you open or use the app. We have a level of security, thinks that it's key right here, so it'll ask us what's the authorization password and if you get the wrong password it won't make any calls so you won't have any kind of people that will just be calling others on your own account. Let's see, go down here. So onCreate is when the app gets created so we have all these buttons, things like that. You know, buttons, views. All right so Make is where the magic happens basically and here's a make. This, the first thing we'll do is check if your device has VOIP support. Since we're gonna be using the Dragon board, this should have VOIP supported, so you don't need to worry about this, but maybe you wanted to use this program onto a different, say an Android phone or something like that. This'll make it so it'll check before actually doing everything else and so your app won't do some kind of like weird crashes. So right here we have a call to the make the SipManager. We'll go ahead scroll down. It's pretty short. See where is it? Oh, right here. So makeSipManager just checks if the current managers null or not and will create a new instance. Instantiate it in the current app context. And the next thing you do, if you remember from above, is we go right into making the zip profile. So it checks if there's a manager. And then after that will just try to make the profile. So remember in the previous lesson, The SipProfile.Builder will allow us to set our username domain as well as the password. And it will create the account after that we need to set up the intent to receive calls. Oh and do note, if you guys don't quite totally understand the explanation here, there is a VOIP application or Sip demo on the Android website. So just Google Sip demo Android, and you should be able to find it. The code's a bit similar. All right, so continue on. We created the receiving intent, which you'll see later why we'll need this. Because without this you'll only be able to send calls, you won't be able to actually take in any calls. So remember we only created Profile, we haven't actually registered it online, so this where the manager will create the registration listener. And go on line, make sure you're console, fine and dandy. You have the, it'll check if the user name, password and domain combo is good or not. Here we actually encounter a bunch of problems and it was because of a spotty internet connection. So make sure your internet connection is pretty solid or this will tend to go into the onRegistrationFailed and the app will tell you that the login was unsuccessful. All right, so after we finish making it, your profile is all ready to go. Let's head on back up here. Yeah, so your profile is all ready to go. So what we did was in this onClick method we created two buttons, like a regular phone, you have the make call button and a end call button. So when you make a call it'll first check if you have the correct authorization like I mentioned before it checks if the key's correct. And it'll check for we'll have a space where you'll actually just add in the username of the person you want to call. RIght now we have it so, right here, so it takes in this, takes in the user name. It'll create the, it will use the zip profile builder to create a zip profile for you to call. Do note that right now the SIpProfile.Builder will only use the same domain as your account. Because everything is hardcoded so everything will be on the Lync phone, the free Lync phone sip services. So, if you want to make your own make it, you can change it, delete this, do this domain right here. Make sure when you type in. You have to type in the whole entire profile address so it could work. Yeah, so then and after that you'll, it'll just make the call. You should be able to hear, and speak into your Dragon board. And on the other end, you'll be able to hear your own voice, you can talk back to yourself. Cool things like that. And then finally the incoming call. So I mention earlier with this intent right here, the pending intent to make sure you can receive calls. We have this class down here called the incoming call receiver. This is where it'll handle the intents when someone calls your Sip account. So let's dive right into the onRecieve method, where we'll set up a listener to the calls. This class will use what I mentioned before in the previous lesson, the manager to take in the audio call. And send the audio call back as a sipaudio call for your main class. So see right here in the incoming call method. So incoming call method there's a couple checks. If you're already in a call you shouldn't get this call. Maybe you don't want it like that. Maybe you'd want call notification to see if maybe there's a more important call. Something like that. Feel free to change it. Remember this is pretty bare bones app and then with that the app will notify you that you have an incoming call and you can choose to accept or decline the call because we also have something where here is. Where it'll tell you who's calling you. So maybe it's say, your mother in law. I mean like, oh I don't wanna talk to my mother in law. So at least you'll know beforehand, who's calling you. And with that, that basically covers the entire sip app. You might not remember everything and how everything interacts, but I'm pretty sure you'll be able to see it in better detail when we actually demo it. And so we'll see you then.