From the course: Creating .NET MAUI Applications with Blazor

Unlock the full course today

Join today to access over 24,700 courses taught by industry experts.

Accessing the native APIs

Accessing the native APIs

- [Instructor] One thing that should be obvious to us by now is that Blazor Hybrid applications can access the full range of device APIs because it has access to anything that MAUI has access to. Right in our Razor files we can call Android and iOS API code just like we can in a XAML file. However, like with a XAML file, we may want to be careful with this, particularly when we may need different code on different platforms. This is even more of an issue when we may want our Razor pages to work in our website as well as our MAUI application. The ability to abstract out platform-specific implementations behind interfaces is a very good way to deal with this issue. In our app we want to add functionality to read the content of our notes out loud. To start with we will make a new interface for this. So, we'll open up MauiNotes and there's an Interfaces folder, and I'll right-click and go Add and we'll add a new item. And…

Contents