 Hi, welcome to Visual Studio Toolbox. I'm your host Robert Green and joining me today I'm very happy to have you back on the show the one the only James Montemagno. How's it going Robert? Awesome. Yeah I know they gave me my own show here You don't come on my show anymore because you have your own show I remember I went back and watch the videos from like four years ago or so and I first came on I think I was wearing something very similar a cardigan and a C-sharp shirt This did not exist. No, but I wanted to come back on and kind of my traditional classic Cardi action For a little reunion between us. I'm really excited Yeah, we are gonna talk about the mobile side of the smart hotel 360 reference app Yes, so just to bring everybody up to speed Smart hotel 360 was the app that we first showed at Kinect all the way back in November. Yeah And it is a hotel. There's a website. There's a mobile site. There's microservices running in containers As this beautiful diagram shows the previous episode we did the website and the Azure functions We're going to do all these services in the middle booking Searching etc. Those are all running in containers. We'll talk about that later But the website talks to those and the mobile app talks to those correct And we're gonna focus on this mobile app stuff today. You're gonna show us cool stuff Yeah, so if I was to zoom in on here So if I was really zoom on the architecture diagram like I went on stage when I talked about the smart hotel 360 apps We really consider it a suite of products. So it's actually not just one application It's a consumer app that we see here running on iOS Android and Windows 10. Yep We have a smart doorbell essentially, which is this NFC Xamarin Android application And the idea here, and we have it on stage here for VS toolbox is that it would be like an embedded Hardware where you're running a custom application. So we can kind of see here We can zoom in on the little tablet here. This would be embedded into a door Right to unlock the actual door with your phone, which sounds very science fictiony But it's it's it's really not the technology exists. It's there. You can do it. You're watching That's we've got smart toilets. How long until we have smart doorknobs in hotels? Exactly. Yeah Yeah, and then finally the big part here is we have another maintenance application that was written traditionally with Xamarin iOS, so no cross-platform UI, but we actually extended it to Android using some of the new Xamarin forms capability So all of these like you said talk to Azure ADB to see for authentication They talk to all of these Azure container services and we'll see that in the API's and it'll feel real Real good for.net developers because it's just making restful service calls back and forth So that in a high level is the architecture and as we can see it talks Twitter. It talks to the database is everything like that And this is really good architecture because when you're building a large application, you have a lot of moving parts So you never want your mobile apps to talk directly to a database, right? That's a bad idea What happens if something gets dropped in the connection you go through a tunnel you want something really resilient So that is why the mobile apps talk to these API's for all the different services Some are running nodes. Some are running.acore and that's what it is. It's just a web API. Yeah Cool. Yeah. So you want me to kind of run through it a little bit? Yeah, let's see it. Yeah So if you didn't get to see it at Connect I have my actual android device in front of me here Which is what you're seeing on the right hand side being reflected Now we did this run through in the in the very first episode Eric and I did the kind of overview, but it's certainly helpful to see it again Yeah, and then on the left hand side you have our remote ios simulator. So I debugged it and I sent it over here That's uh, that's only an enterprise feature, right? No, it's now available for everything something that we we change that connect actually is We call that in the business. We call that a softball question. Yeah, you just uh, it's available for everyone So I do have yes enterprise, but um, but it works in community edition now Cool and what the remote ios simulator does is I have a connection to my mac Which is down there the floor over here still need a mac still need a mac somewhere Uh, and then you connect with the simulator pops up right in front On your windows machine cool. So here. I've already logged in on the device. That's a good looking app And it's a xamarin forms app. It looks very good looking. I know like early on You know it's kind of like well xamarin forms, you know, it's it's good for good enough internal apps But if you want the best looking apps and the most full features of the platform You would probably go xamarin ios xamarin android. Yeah, but that looks like a pretty good app. So yeah, we have like these days What would the advice be on when to use forms when not to use forms? Yeah, so we built this With xamarin forms crop across platform user interface. So if you're newer to xamarin We have two approaches what robert just described We have our xamarin native like classic approaches is building the ui for each platform But sharing all of your back end codes some models view models wrestle services Then xamarin forms we have extracted tons of common ui controls Now what's great is that we have an amazing community of developers What we'll show in the code is how we've able to leverage a lot of plugins to extend control So like actually this little view that i'm swiping through a carousel view is built by the community We have custom charts and graphs, which I'll show off as well So let's say I book a hotel room here. We'll do that really quick On the different devices so you can get a feel for it here and then we'll talk about when you would use what So let's book something in seattle for instance. I'm going to try to do these both at the same time It's a little bit tricky to do Let's go ahead and do that here with this beautiful Chart and graph or the calendar control. I should say with some nice animations But they're a little bit different on each platform. We're just kind of customize the buttons back and forth We can pick the hotel On here. We get these really nice parallax on each platform, which is cool. And then we can go ahead and book it looks beautiful, right? It does but notice that you still get native dialogue pop-ups. We have these beautiful charts and graphs On here and I will say it's like a great time to be not only just a xamar developer dotnet developer But even a xaml developer because there's this immense amount of open source projects that extend these Controls so that that carousel view on top These custom charts are called micro charts that which are powered by Something that we call ski a sharp Ski a sharp is a cross-platform 2d and 3d graphics library that runs natively on each platform So you can do essentially system dot drawing everywhere, right? So so we're able to take advantage of all those and really build these beautiful applications So if you're kind of laboring or you're under the Older old impression now that you can't use xamarin forms to build really good-looking apps That's that's clearly no longer true. That's what we came out to really prove here is that Things have evolved a lot over time not only has xamarin forms gone through a lot of releases for performance Adding features keeping up with the platforms, you know, we have special features built in for iphone x I just have to say that in the latest builds the person that The team that was responsible for uwp Project creation going from this long to this long Yeah, we've done a lot. Thank you. Yeah, I've been a new hero Yeah, you can go into visual studio say file a new project and you have it all scaffolded out So fast now. Yeah, because we've done we've upgraded to dotnet standard. We use package references So your new gets get downloaded extremely fast, which is really cool Now this app though too is not just on ios and android I kind of gave this example that hey when you get into the hotel room you Kind of change context so the smart hotel 360 has the same experience But the idea that the hotel is tablets inside the room so like a surface book or surface tablet So here I have the actual application Over here, but I have it on my windows 10 imagine this was the surface So I could come in I could take a look at my room If I needed to change the settings. I have all these custom sliders that are in here I mean, it's a really beautiful looking application I can take a look at restaurants nearby it can get my Location Of the device that's going to go and synchronize my location here We've kind of hard-coded it so it gets it from new york, which is what this is what you saw up top But it gets a location comes in you can see all the coffee shops. It's a really beautiful Optimized this is the same app. That's on mobile But notice that it has a really great windows 10 experience on the tablet Yep So we did that but I think what's important too when you ask the question between xamarin native and xamarin forms Is that you can still access the native capabilities no matter what I think that's one thing we want to say We just got geo location We made it so the smart hotel door when you come in you can come in and tap and unlock So if we zoom in on the tablet, there's my face And since I'm logged in with off and the door is synchronized with nfc to look for special codes So you logged in on the phone and that's using the the azure active directory B2c yep business a consumer. Yep. Yep, and then I have this nfc button So if my device has nfc, I can tap it to the door and boom it unlocks it because it knows it's me Cool. So that's how we kind of think of it. So to get back to your question When would you use one versus the other? Well, it kind of depends. I mean for me I'm a huge xamal developer. It's where I feel really comfortable. We've made it Really easy to blend the worlds together And so no matter which way you start you're not locked into that approach We have two different things one thing that we call native forms And another one that we call platform specifics. So let me kind of tell you what that means Let's say you start with a xamarin forms application You're like, I'm all xamarin forms xamal everywhere But you're like, oh man, I really want to use that iOS only kind of control Well, you can do today is you can either create a custom renderer like a custom control if you will access on iOS and then blend it in Or we've added it so you can add a custom namespace for iOS into your xamal Or android or uwp If you're not running on those one of those platforms, it just ignores it So I could do iOS give me a segmented control and it just shows up Because xamarin forms user interfaces are native controls So we made it a way where you can shove it in Right because whether you're using forms or xamarin ios or xamarin android You're still wrapping the underlying apis 100% coverage of the apis You know it's been The feature since day one. So exactly it seems like it wouldn't have been Well, everything is hard, but It wouldn't have been that hard from xamarin forms to call into the api In a different direction because you already wrote that code Exactly the other thing that we did is a lot of developers started with just a xamarin native application So they're doing or they already have a uwp app and like hey, how do I go and out of ios or android? And Or they've created an ios app with storyboards and like man, I love my application. It's perfect I have super performance one to one of all the apis But I notice that some of these screens like the about screen the setting screen those screens are kind of generic I would love to reuse those if I go to android a lot of developers Start with just one platform or maybe two and then they want to go to more So xamarin forms native forms What that does is it allows you to take any xamarin forms page And convert it into an ios android or uwp control that you just put into the xamarin app So for instance, let's say I have an item and I say item I tap on it Well this detail page I'd say new xamarin forms page and then I'd say to fragment and it would create an android fragment That I could then use so that means I can start using reusable you user interface without Blowing away my entire application Because if you spent all this work years building an application why throw it all away Just hey, let me just start blending in some xamal then conceivably have a team of Two people or four people half of them who are xamarin forms half of them who are xamarin native and they all get to play together Yeah, and then all of that back end code right all of your models view models Azure integration since I that's all just dot net code. Sure. You know in general. Yeah, cool Yeah, does that answer your question? Yes I mean I geek out on it because so much has happened in the in the space of Not only does xamarin our integrations individual studio But our wonderful community of developers that are building right plugins custom controls I mean that's why this stuff like this is possible. So yes The the quite the answer is it's a great to with both platforms. Whatever you're most comfortable with Um is definitely the route to go I think it's always great to learn the native platforms though Like definitely learn those because then you'll know Why android works a little bit this way? I think I've always said that ios works a little this way Because when you need to go tap into those functionalities you can yep Yep, cool. Let's see some code. All right, cool. Now now we've talked through it all bunch. Yeah So I can walk through the diagram here. I have both of the apps that I just showed Uh over inside of visual studio So what I want to show you is kind of the architecture here And this will look very familiar to the architecture that I've been You know coming on the show talking about for a lot of years We have our shared code which in this instance is a dot net standard 2.0 library so we can see our our dot net standard library here We have all of our new get packages that we're being pulled in And a lot of these here we'll go and move this over here A lot of these are coming from xamarin forms and our map controls because we saw some maps on there But we're also using some cross-platform libraries So the first thing we'll see is we're using app center visual studio app center That was built CI cd on our application but includes analytics and crash reporting distribution and push notifications For our authentication. We're using our microsoft identity client We have then some cross-platform plugins such as our geolocator plugin settings And then some xamarin form specific things So we have a cool animation library called xam animation And then those micro chart controls so all those charts and graphs in there too But then you're going to see some other things that maybe a lot of dot net developers are familiar with like autofac Which is an ioc container So we have everything is interface based first so we can do proper Testing on the application So the developers here chose to use autofac because they're familiar with it You could use other things too like ninjacked or Roll your own or xamarin forms has its own dependency service as well. Yeah And then of course that's where all of the bulk of the business logic lives. So really this is just dot net stuff with some user interface So we have some models. So here's like a hotel for instance just stuff coming from the server We have our you know, uh, code lens coming in there We have our services. So we have some things like analytic booking charts hotels locations Just like at the booking service code does very quickly. Yeah So that is the code that at some point it goes off and calls The service living somewhere. So it's no doubt under that uri building. There's a booking endpoint Yep, okay, and that is what talks to the booking service, which is Sitting, uh, yeah winds up in that kubernetes cluster, but as the developers don't need to care What that's written in the fact that it's in a kubernetes cluster. What the heck is that? I don't know Here's an api. Here's a url to go talk to the restful endpoint Right, and then I just call it and I understand what to send it. I understand what I get back Yeah, so and how we configure this too is all of these are in our app settings So every single endpoint is customizable So we actually load all of these for development purposes from just a json file So we can actually then test our development or production by just loading a file So we can see that these endpoints are all loaded in and these are stored inside of the App's Setting so it's retained through everything else. So if we need to change something we could push some configuration file to That kind of winds up being the next The next iteration of this whole idea of obfuscating like if you We're used to for calling An app an azure app service, you know, you've got the actual url hard coded in your code Yeah, right. Yeah, of course. It works great. Yeah, but if you think about it That's the next thing that you want to start knowing how to abstract that because somebody might say Oh, that's really nice, but you're going to call this service and it lives over here when it's written this way Here's your restful endpoint. So yeah That's a good example of Of that because that booking endpoint could be sitting in azure. It could be sitting somewhere else. Yeah, totally That way you're not just you're restricting. It's going to have to do a whole app update Just update that. Yes. So what's cool here though is I really like this architecture. So let's say I want to get my latest bookings Notice I have this request service So it's really service based and we have this just really generic thing called get async And it's going to give me a bunch of booking summaries. So if I peek in here, this is like the hotel when it's from So it's cool. And I really like to show I start sort of architect all my applications this way So if I go to definition, we have this idea of even obfuscating out our asynchronous calls to the server Because what are you doing? You're making gets and posts and puts back and forth So what we do is we have ones that require tokens or don't require tokens So these things have get and post and put And we look at the implementation here We can see that I can just send it a t results I can send it anything give me my bookings send me this because it's just returning json And we use json.net to deserialize our object. So here we create an http client with our token We go and get that information We handle the response and that handling of the response needs to be done for every single call Which is seeing if it's successful if it's forbidden and we can Propagate up proper exceptions. And then we just deserialize that object back So that way we don't have to go write 8,000 different deserialization of json. We use the power of c sharpen.net, right To actually use all this cool asynchronous stuff. We do stuff on the background So the ui is super responsive like you saw So for a developer, I could start adding new services easily and say, hey, what is that data look like? Yep, and like pull it back in which I absolutely love And at the high level, I mean that's what this series of services are So as I go through we can talk about authentication later, but we have booking We have the hotel information. We have some mock ones. You see these fake ones for development So hey, I'm offline. I just want to do some development I have things For that request service for my suggestion service. So we have our real one and they all use the same thing So onboarding new services becomes just like a few minutes of development Which is great. And of course, you know, we have our ios android and windows 10 application Just like you would expect and user interface test So we ran a series of uh ui tests up inside of uh app center every single time Have you done a show on building ui tests because I hear it's not that easy No, it's super easy. Is it it's super it's super easy You can come in we have pages and test pages things like that It's really simple. Okay. We have a few shows on the xamarin show But i'm actually going to be having the app center team on for a lot of a lot of that soon So definitely take a look there Yeah, and I mean inside these projects aren't really that much. It's pretty minimal code But this is a real app, right? So we have some custom renderers So here I have some calendar and some custom map stuff that I have because i'm extending the controls So you can take any xamarin forms control and extend it one of those codes Yeah, so if I look at like the count as calendar button here Um, I have some code that's essentially coming in. That's a custom element. So what is it doing actually Yeah, so this one is essentially the calendar button that goes Back and forth when I was going and booking the date So if I want to go to the next or to the other side, okay So what this does is it measures out some specific Properties and updates different colors on android And actually draws a gradient over it So that's something that you really can't do so we leverage this custom render say hey in android I can draw a gradient So i'm just going to go and do that with a few lines of code here And then what's cool is that we can change the image or the background Based on the different state that it may be on to kind of spice it up a little bit And besides that there's really not much else in here We have like an nfc service because this is talking to the nfc controller one more question Would you have to do a different renderer for each os? Yeah, great question. So um, how custom renderers work Our way of spicing up a control. So this control Isn't doing exactly what I want it to do. I want to replace it I want every button to look like a flying bird for some reason I don't know and it flutters whenever you tap on it. I was pretty custom, right? Yeah So you would implement that if it if you can't do it cross-platform you implement on each platform So when you go into the ios application here A bunch of nougats, but we'll also see renderers and a calendar button renderer Okay But a lot of these we didn't have to do too many because a lot of them were done for us with plugins Automatically so a lot of those cross-platform ones were already done And in fact if I was a developer of this app or apps for my company I would probably have an entire suite of just my own UI toolkit that way I once I do it once I can then You know share it through apps. Yeah, and that's it That's essentially the structure of the application Which again is going to look very familiar to what we've showed before The biggest difference here since it's all xamarin forms is all of the user interface is inside of that dot net standard project Anything that's shared cross-platform. So basically everything but those renderers Or accessing that platform specific code like nfc And then you have different views for uwp because the idea is that although you could run it on a When there's a mobile phone and all likelihood you're running it on a surface or a Laptop or something and therefore you're going to do a different UI to take advantage of that Exactly. That's a great observation there. I do this quite often Inside of my applications sometimes on ios I want it I want like the entire navigation to be tabbed to base for instance But on windows and on android I want the flyout navigation just because that's what my designer told me to do Right, so I would have a ios navigation Basically wrapper and then on the other platforms. I would use the same Now the key here is that this suggestion view if I go into it here Isn't very much code because it's going to be using some reusable controls And and it's going to use the same view model So you can see it's actually using this suggestion item template, but it's just using it a little bit different So if I came into The suggestions here On android let me go ahead and tap on it should be able to go into it See what's going to load Forget where exactly I have to tap on this thing should go into oh there we go So in here we have a little bit different of a view because this makes sense on mobile Where I'm coming in and I'm actually swiping left and right for instance here Compared to on UWP I have it this way. Okay, and I can do some customization around how I want it to act You could display more information here take advantage of them of the bigger screen screen Yeah, and the other thing too is that the uwp application is like really responsive to sure So they actually have some code in here. So if you are on a smaller device It'll automatically a smaller tablet or you're in landscape or portrait for instance, it'll automatically Do that for you, which is really cool. We can see it go back and forth and Display different information. Yeah, cool. Yeah, and and all the xaml Is going to be very familiar as well. So what's nice here is that if you look at that Our login view for instance, we have We have a bunch of stuff in here Things like styles. So these are kind of setters. So we want this logo for this image to have aspect this height We can apply styles to controls for instance When I come into this page, these are going to look very familiar. We have things like a grid So this is going to have two rows one. That's 60 percent one. That's 40 percent We're using another plugin That's called ff image loading. So while xamarin.Forms has an image control This is a really cool open source library that optimizes Downloading and caching images, which is really nifty If you if your designer gives you like a 5 meg file, you shouldn't try to download into your app But if you do this library will automatically resize it for you So that's pretty cool And then we have a sign-in form right so inside of here We have There's some images in here. We have a label that is bound to a translation of username Inside of here, we have an entry field, which is the username Area here, we have this really cool Specification in the xaml called on idiom. So this is saying on desktop make this control center, but on phone Fill and expand it. Okay, you can do that for ios android windows 10 As well, so that's a really cool way of specifying right in the xaml And you can do that in code if you wanted to everything that you can do in xaml you can do in c sharp code So again, we have another one that's called password an extended control And then we have a lot of grids All of others grids and then we have like a sign up button things like that Which is really cool. So it's just xaml using your styles. You're using background colors using static resources That are going to be described. So if I go into my app xaml, I have all my colors So I don't have to hard code these values everywhere, right? I'm just reusing the accent color the background color I have converters. So I value converters that are being used on the application on the source code, right? Yeah, so if I come over here, I could definitely look at this check-in time converter That's going to take a date time parse it and return Something back specific for string to display in the user interface and these are just i value converters So yeah, everything kind of feels pretty familiar. Some of the names look different But you know overall it doesn't take very long to deal with the fact that there's no stack pale anymore There's the same thing. What's it called? Exactly. Yeah, so the xaml looks very very Familiar there and I would say even if you're like oh james, how did you do that? You know How do you do this crazy charts and graphs and things like that, right? If I actually look at the home view over here We're actually using that chart to do this temperature. So this line of code here Maps To this chart for the temperature and we have another one for the ambient light and this It's all that cross-platform micro chart drawing So I just give it a series of entries and the type of chart I want And boom it displays everything for me Automatically, so that's why xamarin forms is really powerful Not only does xamarin because you get access to all the the native apis all the native ui But you have access to that cross-platform too By these libraries what's in the box or extensibility. So there's a lot that you can do with it This is the cool thing about this code being available in the github repo. I've already gone in and leveraged Some of the code for things i'm building myself is there's There's a whole bunch of stuff in here. You can just go in and grab that code and use it yourself Yeah, yeah, and I think a lot of people when they're looking to say, oh, how do I architect an app or what's the best Where should I put what where right? When does it make sense to use this or how do I get that really cool chart? How do I get that map thing? How do I do that and you that's just grab right? Yeah, just grab it. Yeah. Yeah, and even this like a common thing that we see time and time again is Authentication right we talked about how I authenticate when I do nfc when I log in Into the application and that's all done with azure B2c So this is like the login page here and I can log in with a username or I can log in with my actual Microsoft account right here. So this is using active directory b2c And I've I've done it. So I have the username password or this login page And it's actually super simple to do it's a cross platform library I simply say acquire token async I call this method login with Microsoft when I click that button And it goes and it grabs everything for me automatically and in fact on top of that it will get the attributes For that user so it'll give me the email the given name and the family. That's how you saw my My information there. Yeah. Yeah, which is super cool So just by doing that even code there to get your avatar. Yeah, which is crazy, right? So a lot of these common things. So here's this gravitar So here this is going to be where's our gravitar? Implementation again, everything's Interface first So here we're using gravitar to create some md5 hash Take that email address go to gravitar pull it down And you see that's how you see that nice banner and on the actual right door Which is cool too or reusing code too. That's a cool part of this kind of suite of products is that we're sharing code between our Authentication here inside of our maintenance application inside of our smart door And we can share user interface between all of our applications styles And reuse all those great libraries that are out there. That's awesome. Yeah There's a lot of code in here. Yeah, it's so good I mean and I think that's what's really cool about it is that you can see how we did it, right? If you're like, oh james, I I understand that nfc is only on a few devices Maybe there's not a plugin for it or what is a plugin? I got that code if you're like, oh, I'm really interested to know How did they do location? So if I go into my location service here in code This is in cross-platform code And you would think well, you know nfci you just showed me that code james, right to go access to nfc stuff Well, that's because there wasn't a plugin for it, but the apis are available But for getting geolocation or settings or media or some of these ui controls we have plugins for xamarin So what this does is it goes and uses our geolocator plugin, uh, which I wrote And this goes and with a single line of code gets our position asynchronously Cool on ios android or windows handles permissions for you does everything and it gives you back a latitude and longitude Nice. Yeah, so I mean one line of code like it's for me getting started It's cool to see all of this, but I just want to get the location. How do they do that? Yeah, you can grab it right here Yeah, which is super simple. You can see how we handle All of our exceptions how we can do everything right inside the code. It's really simple. I mean get geolocation handle exceptions Nothing super simple. Yeah, very very cool. Yeah No, no, that's like there's so I mean, I think like you can just literally dive through so much of the app In general inside of here. I absolutely love it. I mean, I highly recommend that that people do that. Yeah And you can of course, we'll add the links to in the show notes below, right? Yep code see how it works and and reuse as much as as you possibly can. Yeah, absolutely better apps Yeah, any other questions that you have for me on this thing? No, it's so good. All right. Let me show you one more thing all right, so um I was showing in the xaml right on that login page I get this question all the time and I wanted to make sure that I covered it since I had this opportunity Is translations, right? Okay, right now we translated this just for english, but notice when I have sign up here That's not hard coded. I'm using this translate extension Okay, and I'm using resx files just like I always have to actually do the translations So this translate extension Extends that um binding And what it's doing is it's saying inside of this assembly is something called the resources and a resx file And down here sure enough we have all of our resx here Which actually pulls and it gets everything for you Okay Now what's really nice is that you can combine this with something like our multilingual app toolkit Which we have some xamarin shows on and great documentation Which is a service that we provide here at microsoft to take any of your resx files and translate them into anything that being can translate Automagically, wow I did this for the first time a few months ago and it blew my mind I right clicked on the file and I had 20 different languages translated all automatically So this is cool because now if you're familiar with resx You have we have these markup extensions, which says hey translate it Sign up which is in the resx file put it in there Super awesome And if you start that from the beginning because you know you're you might want to add spanish or some other language later on Because the app stores provide all of them right and then you can just change the language on the operating system to test it Right. Yeah, exactly. Yeah In fact, you can set the current culture right remember we have current culture of whatever the thread is and boom You can see the entire app in different things. Cool. Yeah, tell me that the ui test a little bit Yeah, sure And are these the same tests that you could send up to? test cloud Yeah, so app center tests now is now the evolution of test cloud. Okay, right So all the great functionality that you had inside Of it is over there. So this is super simple. We do this thing called page based testing So if you think of an application, it's almost like a website. I'm testing this single page And often I need to get from page one to page five So instead of writing the same functionality over and over again, we put them in these things called pages So zoom in over here and we can see the pages that we have we have a home page a login page a book page a hotel page Things that we literally just tap through so if I look at that login page the idea here is that at any point I can come in and I can then grab Any of the fields so here I'm saying on android These are some different attributes that you may look for so there's an email field There's a password field and these are unique identifiers. So let me show you what this maps to so if I go into the login view up here And I look at that Entry field let me go and find it here automation id So we've optimized zamarin forms So you say automation id so that answers my next question was what happens if it's not displaying this password So you're using the automation id. You don't have to use the string use the automation thing And then all we do here is we say wait for the so enter credentials wait for the uh Wait for the email field to be there tap the email field enter the username that I passed in Dismiss the keyboard do it for password and then make sure that the the Credentials were entered and then we can go on from there and then sign in I tap sign in So when I come over into my tasks And I look at this here We can see my single task is now just a few lines of code to log in I give it some username password hit sign in and then I create a new home page And then make sure that when I create this home page It's looking to make sure that the navigation is set up and everything is good to go But from that point I could open the navigation drawer I could do something a little bit different on ios versus android and we can run all of those If you're still using test cloud or app center test. Okay. Yeah, so it's really surprisingly Easy to get up and running as long as you're following those kind of best practices, right, which guess what this app does Of course. Yeah, it was really cool. Excellent because that didn't look too hard, right? This is no That doesn't look hard. I don't look hard. Cool. You can tap a button Just whatever you're doing right in the app. You're like, oh, I'm going to tap this I'm going to enter this and they align really nice To what what's happening right here in the ui. Are there ui recorders that'll Uh build that script for you based on what you're doing literally on the device Yeah over on the mac we have one and we have an extension that's in was in preview for uh visual studio But we actually have a repel which we really like so when I hit debug on my test It'll pop up a little explorers. I can say Give me tree and it'll output everything and I can say app dot tap and then copy that back in got it We do have a test recorder over on the mac though for ios and android. All right. Yeah, awesome. Cool Yeah, I think that's all I just want to make sure I hit those but I'm glad that you I'm going to talk about ui test. I don't get to talk about it too often and this one is structured really lovely Very cool. Yeah, all right. Thanks for coming on. Absolutely. Thanks for having me. All right I hope you guys enjoyed that and we will see you next time on visual studio toolbox