Using Native Controls in Uno Platform Applications – Demo Code Included

The truly successful frameworks are ones that empower developers by offering the flexibility of working with whichever libraries and tools are needed based on the platforms targeted. In Daniel ‘s UnoConf 2021 session, he shows us how we can use native APIs on our Uno Platform applications that gives us access to the tools needed to get the job done in case a suitable cross-platform control doesn’t exist.

In mobile scenarios, if you ever have a need to incorporate a purely native view in Uno Platform cross-platform app, there is an option to do so. Uno Platform views inherit from the base native view defined in .NET binding or the native framework itself, so you can incorporate native views into your app’s visual tree. For Web / WebAssembly scenarios Uno Platform provides the tools to allow use of JavaScript libraries that are out in the open such as i.e. Flatpickr, something well documented in our docs.

Watch as Daniel demonstrates the steps to create a barcode reader app that targets two different platforms, Android, and the Web.

• Create an html5 video tag that will load the feed of the webcam on the web page
• Import the QuaggaJS library into our project so we can start scanning our barcodes from our video feed.
• How to invoke C# code from within JavaScript.

You can find the demo code here

If you need more support or want a deeper level of support beyond our free community support on Discord, we offer several paid support options depending on your team size and project needs.

Share this post: