Accessing Native Platform APIs in .NET MAUI

Ғылым және технология

Let's look at the many ways of accessing native platform APIs with .NET MAUI including everything built into the "Essentials" of .NET MAUI, tapping into platform specific code, using dependency injection, and so much more!
Links:
Platform Integration Docs: learn.microsoft.com/dotnet/ma...
.NET MAUI on GitHub: github.com/dotnet/maui?WT.mc_...
Source Code: github.com/jamesmontemagno/Ma...
Join this channel to get access to perks:
/ @jamesmontemagno
👕 Buy some swag! - jamesmontemagno.myspreadshop....
☕️ Buy me a coffee - www.buymeacoffee.com/jamesmon...
Follow:
👨‍💻 GitHub: github.com/jamesmontemagno
🦜 Twitter: / jamesmontemagno
📄 Website: www.montemagno.com
📰 Newsletter: newsletter.montemagno.com/
Disclaimer: This channel, videos, and streams are created in my spare time and are a product of me... James Montemagno! They are NOT officially affiliated or endorsed by Microsoft (my employer) in any way. Opinions and views are my own.
What is on my hat? It is the CLE clothing logo because I am from Cleveland! Checkout their awesome CLE merch: cleclothingco.myshopify.com/
What is that art on my wall? It is an original piece from the French street artist Gregos of La Butte Montmartre: / bcez1onhiqx
Chapters:
00:00 - Intro
01:00 - Why native APIs are important
02:15 - How to access platform APIs
04:00 - Access networking APIs cross-platform
07:50 - Accessing with Dependency Injection
10:00 - Access platform specific APIs
17:40 - Best practices for accessing platform APIs
22:00 - Wrap-up, NuGets, sharing code, and more
My Setup:
📷 Canon M50 Mark II - amzn.to/3P8R7lp
💡 Nanoleaf Elements Lights - amzn.to/3umwJVW
🎙 Blue Spark Microphone - amzn.to/3qgtYkq
🎙 Blue Pop Filter - amzn.to/3jEWM3r
🤳 Rode Microphone Arm - amzn.to/2Z68AlE
🎧 Sony MDR7306 Headphones - amzn.to/372jxta
📲 Stream Deck - amzn.to/373Uk1n
📹 Elgato Cam Link - amzn.to/3a9eGbh
📷 GoPro Hero - amzn.to/374lm90
🖱 MX Master 2S Mouse - amzn.to/3d7J2gj
⌨️ Tecware Phantom Keyboard - amzn.to/3aUP4y9
#dotnetmaui #dotnet #androiddeveloper #iosdeveloper #windowsdeveloper #visualstudio

Пікірлер: 67

  • @YaSiRaRaFaTdoTNet
    @YaSiRaRaFaTdoTNet Жыл бұрын

    Thanks, James! Another great video!

  • @micomc
    @micomc3 ай бұрын

    More MAUI!

  • @MultiKokee
    @MultiKokee Жыл бұрын

    excellent video, thanks James

  • @TioPew
    @TioPew Жыл бұрын

    I do really love your videos, true MVP.

  • @StockFootageCollective
    @StockFootageCollective Жыл бұрын

    This is the video we needed.

  • @ademineshat
    @ademineshat Жыл бұрын

    Great videos as always. It could be great to see "From Start to Finish app" but some real world stuff. Thanks James 😍

  • @geekincoder6435
    @geekincoder6435 Жыл бұрын

    Only this week I’ve started using MAUI and you couldn’t have timed this tutorial more perfectly! 😅 I’d love to see a tutorial on creating custom Gestures in MAUI as sometimes swipe, taps and drag/drops isn’t enough. 😊

  • @dlandi
    @dlandi Жыл бұрын

    Great! Also looking forward to the next video. I need that one too!

  • @DanFlakes
    @DanFlakes Жыл бұрын

    Last week I was working on native bottom sheets and I have to say the DI way worked out great !

  • @JamesMontemagno

    @JamesMontemagno

    Жыл бұрын

    Nice!!! That is great to hear!!

  • @drawcoder
    @drawcoder6 ай бұрын

    Solid, the lazy load DI and same namespace across platforms are excellent tips. 🏆

  • @JamesMontemagno

    @JamesMontemagno

    6 ай бұрын

    Glad it was helpful!

  • @RickardApps
    @RickardApps2 ай бұрын

    Very nice!

  • @vtome4165
    @vtome4165 Жыл бұрын

    Great video, thanks a lot!

  • @Shoyer01
    @Shoyer01 Жыл бұрын

    Awesome!! Thank you!

  • @rodionradchenko7708
    @rodionradchenko7708 Жыл бұрын

    Just managed to get Apple's ARKit running in a programmatically created UIViewController all within MAUI. So fast to prototype and iterate without the need of a mac build host. Thanks James!

  • @josedonizeteoliveirajunior1744
    @josedonizeteoliveirajunior1744 Жыл бұрын

    Awesome, thanks for video

  • @paulluc5116
    @paulluc511611 ай бұрын

    Really appreciate the content, James. Keep up the great work. Might you be able to provide guidance related to integration with 3rd party platform-specific SDKs containing a multitude of dependencies?

  • @alexdodd5175
    @alexdodd5175 Жыл бұрын

    @James Montemango thanks for this guide. Please make one for JAR and XCFRAMEWORK linking to the MAUI app. Thanks.

  • @Brendan2Alexander
    @Brendan2Alexander Жыл бұрын

    I like this channel better than kitten videos. Awesome vid thank u!

  • @rampoona67
    @rampoona6710 ай бұрын

    Saludos muy buen video

  • @johnaldridge7454
    @johnaldridge7454 Жыл бұрын

    Hi James great content as usual. I am struggling to resource any Bluetooth LE so I can communicate with our own hardware. I only need a kick start in the right direction with .NET MAUI. Something simple like search and connect button with the ability to read and write characteristics would be fantastic. 😅

  • @JamesMontemagno

    @JamesMontemagno

    Жыл бұрын

    Look at the library called Shiny, does it all for you

  • @alessandrosimonelli5878
    @alessandrosimonelli58788 ай бұрын

    Grazie.

  • @darshangandhi559
    @darshangandhi559 Жыл бұрын

    Hi James, it would be good if you can give live demo of how to use native .so and .DLL files with maui

  • @anthonysarkis398
    @anthonysarkis3988 ай бұрын

    hi, first, thanks for the video. but it seems like i might be missing something here. is there a previous part for this video? just to figure out where the binding came from? thank you

  • @TioPew
    @TioPew Жыл бұрын

    Hi James, I've tried to use EF on maui, using sqlite libs, but it doenst compile, tried everything, it says android is no compatible.

  • @brendan1516
    @brendan1516 Жыл бұрын

    James, love your videos. I'm about to start on a journey into my own app development and have been looking towards .NET MAUI for a while, but I have a question that I can't find the answer to. Will I be able to create apps that have can have features locked for premium subscriptions? So I can offer a basic set of features for Free, with the hope of gaining app subscribers for the most value adding functionality?

  • @DanielHarrisCodes

    @DanielHarrisCodes

    Жыл бұрын

    You could definitely implement this. The various platforms usually have their own way to offer in-app purchases through the platforms store. You could have them sign up outside of the store on your website (like Spotify) and then when they login your backend could determine if they are licensed

  • @DeepWorksStudios
    @DeepWorksStudios Жыл бұрын

    Who gots also issuhes with the ios remote simulator? no matter if i use xcode 13.3 13.4.1 14.0 or 14.0.1 visual studio latest stable version or latest preview does not matter all dont work some more some less. PLESE HELP

  • @GuildOfCalamity
    @GuildOfCalamity Жыл бұрын

    Did not see the link you promised for Johnathan's blog post?

  • @TheErudito
    @TheErudito Жыл бұрын

    How to save a data example a token in maui i need help you please

  • @akshayjain4001
    @akshayjain4001 Жыл бұрын

    @JamesMontemagno anything in MAUI community for charts?

  • @cjtg82
    @cjtg82 Жыл бұрын

    Hi James, I have been looking for information about migrating a Xamarin Native app to MAUI. There is plenty of blogs and material for Xamarin.Forms to MAUI tho. The only thing I found was that you have two options: 1. Do not migrate to MAUI and just upgrade you Xamarin Native projects to .NET 6 (or7). 2. Migrate the Xamarin native UI to Xamarin Forms and then to MAUI, or to MAUI directly. Are those two approaches correct? can you make a video explaining the best approach?

  • @danielblakeley2995

    @danielblakeley2995

    Жыл бұрын

    yes please

  • @user-fd1bq8cf7h
    @user-fd1bq8cf7h11 ай бұрын

    Could you make video how to use admob in maui?

  • @imanqoly
    @imanqoly Жыл бұрын

    Hi, thanks for your great content. In documentation of .net maui in communication section we have creating email by default email app. But nothing explained whether we have access to inbox to read email. Can you explain

  • @JamesMontemagno

    @JamesMontemagno

    Жыл бұрын

    Not to read email. That would be a huge security hole. You would need to implement email protocols and become an email app

  • @imanqoly

    @imanqoly

    Жыл бұрын

    @@JamesMontemagno thanks for your answer... that's what I need... I need the app to read the received email programmatically... and then forward it... is there any documentaion for this specific need?

  • @SathishKumar-yn7fq
    @SathishKumar-yn7fq Жыл бұрын

    Hi James, Can you suggest me any Bluetooth LE framework to communicate with hardware in .NET MAUI. Like read and write characteristics with examples. Need to support both iOS and Android.

  • @massimoconti5431

    @massimoconti5431

    Жыл бұрын

    Also Windows and MacOS support is needed.

  • @JamesMontemagno

    @JamesMontemagno

    Жыл бұрын

    Looks at the library called Shiny

  • @arthurkelley
    @arthurkelley Жыл бұрын

    whats the differnece between maui and kotlin multiplatform mobile? is kotlin better? its android native + ios. and in maui its both not native.

  • @YaSiRaRaFaTdoTNet
    @YaSiRaRaFaTdoTNet Жыл бұрын

    12:59 If this redundancy could be minimized at some future release that would be great!

  • @MuhammadNadeem-wj6xd
    @MuhammadNadeem-wj6xd Жыл бұрын

    Great

  • @jstnflnt
    @jstnflnt5 ай бұрын

    Can a .Net MAUI app access iOS FamilyControls to pull ScreenTime data into the app? I'm struggling and considering restarting the project in XCode to simply "import FamilyControls"

  • @JamesMontemagno

    @JamesMontemagno

    5 ай бұрын

    If it is a swift specific API then no, which it looks like it is, but something they are looking into for .NET 9 github.com/dotnet/runtime/issues/95633

  • @JamesMontemagno

    @JamesMontemagno

    5 ай бұрын

    Although technically maybe through channels... github.com/Redth/Microsoft.Maui.Platform.Channels not sure

  • @jstnflnt

    @jstnflnt

    5 ай бұрын

    I appreciate the pointer. I'll use my duct tape solution until .NET 9 arrives

  • @zorzional
    @zorzional4 ай бұрын

    Hello, I am working on a project in which I use usb device on Android device. However I cannot find any example with .net maui. Could you please help how I can use Android.Hardware.Usb ?

  • @JamesMontemagno

    @JamesMontemagno

    4 ай бұрын

    You would just write that code in C# in the Android folder: learn.microsoft.com/en-us/dotnet/maui/platform-integration/invoke-platform-code?view=net-maui-8.0

  • @mrgujjabillionaire
    @mrgujjabillionaire Жыл бұрын

    Hi James Thanx for the video, but please do me a video where where an app gets current location of user and it geocodes it into address names and then the values are posted onto a label or entry. It is really troubling me, I want to see what am not doing right and I know it will broaden our knowledge further. Thanx buddy

  • @younessesoft
    @younessesoft Жыл бұрын

    hello , plz help me i need send ussd command with .net maui i search on internet i cant find any documentation plz help me how can i send ussd command like consulting balcance *100# plz make video tutorial for that or give me any linq or explanation plz

  • @victorchisomnwisu9776
    @victorchisomnwisu9776 Жыл бұрын

    Default interface implementation could shine here maybe since no implementation for ios and windows

  • @JamesMontemagno

    @JamesMontemagno

    Жыл бұрын

    Ohhhhhh wow!!! What an amazing idea!!!!

  • @mandipshaw
    @mandipshaw Жыл бұрын

    Hi James ! Mandip this side. Loved your videos a lot. Could you please help me to auto read OTP from SMS in MAUI. That will be great help. I am using MAUI Blazor for my app. :)

  • @istomin_19_43
    @istomin_19_43 Жыл бұрын

    Maybe some Arkit? Is this possible?

  • @sheilainglin863
    @sheilainglin863 Жыл бұрын

    😁😁😁👍❤

  • @massimoconti5431
    @massimoconti5431 Жыл бұрын

    James we need Bluetooth LE API with the same interface for all platforms.

  • @JamesMontemagno

    @JamesMontemagno

    Жыл бұрын

    Take a look at Shiny -> it does this today shinylib.net/

  • @cliptioncode1638
    @cliptioncode1638 Жыл бұрын

    When will .NET Maui have an API for Widgets? Would be great if they could provide it 🤗, so we don't have to write Code on our own each time for every Plattform 😅

  • @JamesMontemagno

    @JamesMontemagno

    Жыл бұрын

    Probably not, just because they are so dramatically different and on iOS you need to use embedding as widgetkit is only swift. So at this point if you need widgets best to optimize per platform IMHO

  • @frankfalvaroiii
    @frankfalvaroiii7 ай бұрын

    Wow, you have a pachinko? :)

  • @JamesMontemagno

    @JamesMontemagno

    7 ай бұрын

    My grandparents had it and I was able to save it and restore it a bit :)

  • @aemarco
    @aemarco Жыл бұрын

    Hi :) Show us Tizen... plz

  • @kimpadkjr4730
    @kimpadkjr4730 Жыл бұрын

    Thanks, James. Great video as always!

Келесі