Dotnet MAUI Android Deeplinking Easy Way

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
in this video we'll be learning about.net Maui deep linking that means whenever a link is clicked then we are going to extract out the token that means this is the ID that we are going to take out from the given URL whenever the link is clicked in our dotted my we Android project but in our next tutorial uh I will be doing it on our iOS so watch that videos Link in this video's link description below okay so whenever the application is killed also when I click on the link then we should be able to get the uh token out of the whole URL okay so let me just open it and then here you can see uh our application so the extracted out token and you can implement the API after API call after that and then transfer the user to specific pages but you have to watch this video fully so that you can implement it or else uh in my opinion it doesn't work if you don't watch this video fully Okay so uh what we need to actually do is in our mainactivity.cs we just implement this HTTP intent filters as well as https uh Indian filter here my website is HTTP okay so here you can see uh this is my uh actual website that is like uh the HTTP and there is no www so it was that thing out HTTP and www it's not there that is this is the simple string URL that I have and don't forget to add this name species and then uh actually what we need to do is to add the data uh path prefix so data path prefix is my disk space and here you can add anything as you like so what I'll do is like I'll just give it a test case of what I need uh I need to do in the URL so if you have the jammed in guys so as I say uh your own site then you need to go to the old presetmin and then page add new page and then later suppose uh b-a-n-a and a banana okay so if I click on publish if I click on publish okay so this is my website URL okay so now the data prep is banana okay so banana banana okay so now uh like uh that that this is fully configured okay and now what we actually need to do is so we are going to uh add some valuable information in this data prefix okay so in order to do that what I have done previously was this way okay so if it is there then token equals to this is the uh token that I'm adding and if it might be ID in your cases okay so we we need to extract out this string after this uh equal sign so that that is what I have written over here so in our main activity there are two things that we are need to do that means whenever the application is fully closed then this method this uh this indent filter is going to work and if um like application is restarted every time means if the application is in foreground or background then this method is going to get triggered okay so was that thing out and we are doing simple way of extracting out the string after equals okay you can see over here it might be columns in your case or semicolons in your case okay and here in my case there is equal so after this equals I'm starting out this string and this is just a simple way of extracting the uh strings out of the whole Ura okay so that is it we are doing the same thing in in this case also in this case also same thing okay nothing fancy over here and the last thing that we need to understand is uh or the sending the uh extracted out token to the uh calling classes okay that means the calling uh UI that means our app.xml.cs so this is the mandatory way uh in my case okay that means uh we need to send the data or to the app.xaml.cs don't send the data to main page or order space or notification page because it won't work and our app.jaml.cs is already registered every time whenever the application is killed or whenever the application is uh in the foreground or background so this is the actual way of registering our weak reference messenger this is the messaging uh like this is the messenger which helps to send the data so in order to implement this messenger we need to add the plugin manage nougat package and then community toolkit okay so just type a common toolkit and that mbbm so this is the plugin that I have added okay to all of the projects and then which helps to uh like a register a app.xable.cs okay so here um whenever uh like with the help of this classes and let me go to the admin main activity.cs here you can see uh we create a Facebook Messenger is a registered over here using this uh plugin namespace implementation and with the help of this class uh class okay we are going to send the string to the app like app.zaml.cs okay and after the data is passed then we are going to start a timer that after two second uh we are going to perform any of the uh like um All Odds or anything like that and if you want to get API calls over here okay just create a method and then generate a API API call over here okay so generate a method and then make a a synchronous also you can do anything and then call your API okay call your API okay it depends upon your use cases so what how you can implement it and you can just use the piece navigation or anything as you like now what our final thing is uh we need to run the application and then send the uh this banana banana as a like a data prefix and then along with the token so that we can extract out the uh token ID from it so what I actually need to do is like uh let me run the application okay so this is my final URL right so this is my final URL which goes to the Gmail okay so what I'll do is like I'll just copy it okay and I'll just send it to the my Gmail account okay so uh compose to okay so I'll just compose it and then this uh email is already sent means already there in my uh Android device okay so actually I'll just do this one I'll just do this let me go let me go back let me go to all inboxes okay and I should have got the email over here and you can see banana SLS token is there as soon as I click on this link then the Deep linking should work and I should extract out the data out of the whole URL so that is it so this is how the Deep linking works on Dot and Maui Android that's all for this tutorial thank you guys thanks for watching keep interest for our next tutorials
Info
Channel: Xamarin Guy
Views: 4,623
Rating: undefined out of 5
Keywords: #DotnetMAUI #Xamarin #XamarinForms #Dotnet
Id: SP_CwEmePkE
Channel Id: undefined
Length: 6min 46sec (406 seconds)
Published: Fri Apr 21 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.