.NET Maui Apps | How to publish Android APK and Window MSIX applications locally in Visual Studio

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello everyone welcome back to netcode app  Channel it is a great pleasure to say welcome   now this channel that is a net good app  facilitates on.net lessons and projects so   you can subscribe like and also share this channel  now in this lesson it's going to be a short one   and we are now working on dot net marry  app that is Eva desktop or mobile app   I'm going to show you how to publish  an app either it is Windows or Android   now this publishing we are not storing this  online apply this to the Microsoft store or   the Google Play Store let's say you have your  organization and you want to publish this app   create an internal app for the organization  so we don't need to upload this online   because it is within also when you have a personal  application you want to install your computer   or install it on your phone your Android phone  you don't need to install it or upload it online   so this is going to be the native local one so how  to publish either Windows app or an Android app   and install that is what we are  going to have a look in this lesson   so let's start I have a simple it's an Android  project but I'm going to also build it in the um Windows app as well so it is just there  is a app that I've built this is a login page   now with this login page you  know it is an Android bar app   it is in the windows mode so you see that it  is not the proper way to do that in Windows   you see the login here and you can expand it very  long as you can see all right so let's assume we   are done with our projects like this and we  want to it's our login and we want to build   this to make it as an application to install as  a package to install on this Windows what can we   do or how can we do it that's what you're going  to have a look now first I'm going to close this   so there are some basic things that phrase  you have to do that is the icon the name   yeah and also the target so for this  Windows side let's right click this   so right click on the project  and then go to properties   now I could see when you click on projecting go  to properties you have this error because when you   use the preview version that has the.net 8.0 this  is an error from the community so they are yet to   fix it so if you want to make any changes in their  properties using the the net 8.0 preview you can   have access to and let's use the stable one which  has dot net 7.0 and 6.0 so we are going to build   the Android in the stable version but this window  one you can build it in this preview version so we can just click on this let's close this  so instead of go to the properties let's go   to Project properties instead so click on this  project and I already have this clear details here   now in here if you see we have the application  title you can specify it here okay now what   we can do from this build properties we  can do it here so this application title   another is a company name so you can set this  as you can see from here these are pin titles   and Amber ambulance that is 90 years com does a  company that's called Hub dot ambulance app one   then when it comes to PCB is the version so you  can change the address now maintain it as it is   now this I think that you can  configure also you can talk about   this is a key file I have done this you're going  to do this also because you have an application   icon you have copyright and all this stuff so  you're gonna write them or this we're gonna put   them here so you're gonna save another oven .net  8.0 why you can't have access to the properties   you can just pause the video now grab this  property group or put them over here and now   passing the data or the information that  you want to attach to the application   when we are done you come to the icon so  we have the app icon so here I'm using a   different icon that is a API or another app  icon SVG and that is a color that's all right   and you can see this is also the splash screen  so I have another image for that lvg file for   this class screen so if you want to grab an  SVD go to online now get an svgs or image   as with this you're gonna have a lot or you can  actually create your own then you can use it here   so you need to change the marry icon and also  the Mario splash screen icon so these are the two   things that you need to do here now once you're  done then you're ready to go so we have to first   build the project so let's do this project the  main project so click on this so first let's clean so let's wait so as I see that now let's build this project so as you can see from here it is it is building  the projects now let's wait for to finish or see   the next step to do after this is done all right  so you see that here we have the application built   successfully so once I see that now the lesson  that we need to do is let's check this so click   on this the back and unless to the configuration  manager so with this configuration seem to release   now maintain this value that I want to do so  and that's an active solution so set to release   and that's going to pop up over here any CPU yeah  we choose that so you see we have the release   version here and the lesson that we can do here  is once you have this release let's also build   a solution so let's build this solution whilst  it is in the release mode so we build it then   we go in there and publish it when this  is done so let's wait for this to finish   the building then we see the way forward all right so okay see that's the build  is also done once I see that zero failed   so the next thing that we can do here  is Once in a release mode Let's go in   there and then build or create a package the  ratio this is selected from this tool that the   window machine selected okay so right  click on this and I click on publish   so click on publish now when you come here  you can see we have two options that you can   actually select from now it is asking us  how would you distribute this application so this time round we are going to select from  the side loading so what actually let's start   loading the functions are here click on that  and you can see inside loading apps is when you   install up that array from the official source  and that's the Microsoft store as an example   so let's say your organization May create  its own app including line of business apps   so many organizations create their own app  to solve problems unique to their business   so as you can see from here let's say you have  an application this app or this package that you   don't want to upload it online but rather one  is an internal one all you want to install it   locally then you can go for the side loading so  do you want to enable automatic updates uh you   can just click no or yes in any of them  you can click and now the next thing is   yeah we don't want to get a certificate since  we're going to install it online look on so   let's keep that and I click on next so let's  publish them here we need to create a profile   as you can see the version starts from automatic  increments so you can increase over here but let's   maintain this and uh let's create a new profile  so select release and now this is the Windows 10   um let's choose default one it is your 64 so we  can see that 32 bits you can choose 64. so that   is what you want that's a Target runtime you  need it you have to be installed on the Windows   64-bit operating system self content is true so  everything that is a PC needs in order to run   on the computer it has to get it grab it or add  it to the package and as you can see there is a   location that you want to install it so we  click on okay so once you have this now this   is the published profile that has been created  here then we can move ahead and click on create   so as soon as I click on create let's  see what happens here so click on it so you see probably started so it is published  in our app so let's wait um one of these finishes okay so you see from here that's it is  done and that's what you're going to   do we have to navigate to the root folder so  you can have it or you can grab it from this the bin and the release so that the file is over  here so we can grab it now let's navigate so   where is the folder okay so that is a the  project and you go to the bin uh release and   it can be found in the market list or the  wind devices obviously we have published here   we have the app over here we can also  grab the same app under the video section   and it is over here so let's open this we double  click on it and we're going to generate the file   twice so let's see so from here that is  a project you see we have a bin the bag   and we have our app in here that we can actually  grab it so you see there's a package now   so we go back here to find that to go back to  the bag and let's see window 10 and publish   let's see where to grab it up  package okay so that is this far   so we can grab this file or we can install this  so if I double click on it you could see it is   saying that Amber ambulance is already installed  so do you want to if it is not then I could have   installed but it is stored now you see it's saying  that this package is not signed with Transit   certificate because we did not sign and because  it's a the internal app I can click on lunch   and now this is going to launch the  application as you can see from here   so I wait and that is the app  okay so you see the icon over here   and that's the ambulance service so if I let's  say I'm will answer do I have you see I have   the app installed over here okay so that is for  Windows side let's check how to do that in the Android 2. so with Android the first thing that  we have to do here is let's also based on the   same release let's review it already we can also  build it once more so let's click on solution   let's clean solution so clean now let's change this to  framework and now we are going in for   Android so we choose Android and back with this you see that this is the  preview so we cannot go to their properties here   so let's try that and see now I have this chosen   right click this or let's  build the solution together so let's wait for the build to done okay now this is also done so  let's right click and go to publish   so we wait for this to be done I can  see Android is selected automatically   if not then I cannot go for the Android from  this platform and choose that I've already   um publish one and that is this but we are doing  this together also so we wait what is packaging   um this far and here the time should  supposed to or the type is an APK you   know we have an aab and that is for the app  that I want to upload to Play Store and you   want to install locally then you need  with extension of APK now will be APK so this is done let's see so it is done you  can see bundle format is APK now to check for   this or to check this you change this you know  I'm using the visual studio the preview version   so I'll go to the project do close here  and you can add this with a true code   so let's see where we can find this APK so we're saying you can add this  Android package format that's In apk   okay you can add this over here that is the  code because if you try to go to properties   to add it we're going to have error in it that  is a PV version but I'll go through the steel   version to see but this is going to work with  the previous version that's what we have so all   the things that needs to be done has to be done in  the code okay now let's finish this up so we have let's close this we have the archive so view archives and that is what we have  created now okay so that's an Amber ambulance so   let's see now although we have created this you  can click on open folder there is a APK file   com dot netcode.ambulance app one dot APK there  is a app but if you try to install this if you   install it on Android it's not going to work  you want to say pass error because you have   to add the key to it so how do you add the key  so select it and then go click on distribute   now the distribution click on the add clock and  I've created one already so I'm going to delete it   okay so I'm going to lay this one off I can  add another one here so click on this add   and now what is the name here  that is an Amber ambulance the name of the app and balance one  another password is one two three four   and I'm going to say one two three four okay so let's see let's  add one more one two three four five six   let's confirm one two three four five six   now what is a validity 30 years socket  now full names I'm going to say net code um organization units yeah that is one maybe net  code hub now I'm going to choose this this nakura   because I'm in Ghana and the stadium state is  country code is two three now click on create now you see this is created so click on the  current one that is the app and I click on save   as so we see now choose a location that I want  to store this app now click on this so it is a   working folder and I want to save it here if we  see the output here it is the output here it is   an APK format so let's that's the name click on  save as and now let's wait for this to get save   nice request a sign in password another one  two three four five six so click on OK and   now let's wait for this to finish you see it  is signing application funnel now that is done   when you go to the projects and that is this one  working folder so we see we have the app here now   this app is ready to use you can install it  on a mobile phone and try this application   okay so I'm going to close this now let me  open the other one that the visual studio   2022 because it is the preview one and that  is a 22 stable version let's open it to the   administrator and I'm going to close this one  okay so when that is done let me close this one   good now I'm opening the stable one opening the  same projects and I could see with this when you   use this you can be able to go to the property of  your project and I'll make some changes in there   if you don't want to do it in the code you  can do it manually visually yeah that is it   so let's wait for this player to get loaded  and I right click on this go to properties so click on properties and let's switch while it  is just populating and properties related to this   particular project that we have created so let's  wait for a while this is going to open soon for us okay so loading properties now everything is  sets good so you can see we have the application   properties here and the first one is General so  with the general or another thing will take you or   the common thing we go to all the platform that's  another General so you see we have the application   and the assembly name and um the ambulance app one  we have the little spaces another targets even iOS   so let's go to Android so with the Android if you  have the target one so the target one time is 7.0   and the target Android 13.0 you can see you have  the minimum one the 5.1 that's the lollipop you   can choose to select the python or any of the  minimum version of Android okay now while you   are done you can see when it comes to um Android  this we see here Android package format so this is   um Native installed if you want to install it  locally on a mobile phone then use an APK as   now you're choosing the bundle it seems that I  told you that this app is going to be installed   online to the Play Store yeah so choose APK and  you're good to go and now as you can see from here there are some stuff that I need to  do and go downstairs Also let's see   go down go down down down down  and let's see what we can do also okay so I didn't iOS I want to talk about  the Android so yeah let's see let me see okay so we see package signings  and this is an iOS so who's this   that is the package sign in so in case you have  the key that's what we've created you just have   to check that it means the app has to design  and the other stuff okay so these are the basics   ones that you need to do especially the Android  package formats if you want to have the APK file   and also to set the name and the other steps as  well you can put them over here so the target   framework in ETC so um it is advisable to use  a stable version when trying to publish the   app because with the preview version it has this  um internal error or another property side error   that you can view the properties and I like to do  it with code okay but with the help of this uh the   stable one you can actually do everything about  it okay so now we have done we have been able to   publish our window app and also our Android app  as well I believe this video or this lesson has   given you some insights in in doing this thank you  guys for watching if you like what I'm doing give   me thumbs up if you have any issue too you can  put it at the comment section also yeah that is   it for you to take care of yourself alright  I'm going to catch you up in the next video
Info
Channel: Netcode-Hub
Views: 2,978
Rating: undefined out of 5
Keywords: asp.net core, Registration, controller, service, email service, web api, SMTP, pagination, EFCore 7, skip(), local storage, scalffold, scaffolding, migration, database migration, creating models, fileupload, blob, javascript, ef 7, authentication, client-side, jwt, token, role-based, assign-role, maui, mobile apps, consume web api in maui app, maui app, mobile app, desktop app, create app, barcode, qrcode, android, apk, applications, application, publish, windows, MSIX, publish apk applications
Id: gphfHZI4yXI
Channel Id: undefined
Length: 24min 7sec (1447 seconds)
Published: Thu Jul 27 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.