Overview
The EMDK for Xamarin (EMDK-X) now supports the Microsoft .NET Multi-platform App UI, better known as MAUI. Developers can now use the cross-platform framework for apps that target Zebra devices and use EMDK APIs.
Also see Developing with .NET MAUI on Zebra Android Devices from Zebra engineering.
Requirements
- EMDK for Xamarin 8.0 (or later) Set it up.
- Visual Studio 2022 (or later) Get it.
- .NET 6.0 (or later) Get it.
Create an App
To create an app with EMDK-X MAUI:
1. Create a new project. Open Visual Studio and create a new .NET MAUI app:
Click image to enlarge; ESC to exit.
2. Install the XamarinEMDK NuGet Package.
a. In Visual Studio, go to Tools > NuGet Package Manager.
b. Select "Manage NuGet Packages for Solution" from the submenu:
Click image to enlarge; ESC to exit.
c. In the Browse section, search for "EMDK" and install the most recent version of the EMDK library:
Click image to enlarge; ESC to exit.
3. Verify the Xamarin EMDK library.
a. Open the .csproj
file.
b. Verify that Symbol.XamarinEMDK
is added as a package reference (highlighted section, toward the bottom of the left-hand window in the image below):
Click image to enlarge; ESC to exit.
To use the Symbol.XamarinEMDK
library, navigate to the MainActivity.cs
file in the Android platform section and import the library. A line should appear as "using Symbol.XamarinEMDK;" as in line 4 of the screen shown below:
Click image to enlarge; ESC to exit.
4. Install Profile Manager Plug-in.
a. In the Extensions menu, select Manage Extensions.
b. Search for "EMDK" and download EMDK for Xamarin from the results list (see image below).
c. After downloading, quit and re-open Visual Studio. A dialog titled "Modifying the project" should appear.
Click image to enlarge; ESC to exit.
5. Access the Profile Manager Wizard.
a. Go to Extensions > EMDK > Profile Manager.
b. Use Profile Manager as needed. Learn how and why.
If "EMDK" does not appear in the Extensions menu, repeat Step 4.
Click image to enlarge; ESC to exit.
Click image to enlarge; ESC to exit.
Continue developing project as desired.
Sample Projects
EMDK Xamarin Samples | See all Zebra sample EMDK-X projects, including "MAUI Barcode Sample1" and "MAUI Profile Clock Sample1"
Also See
Using Profile Manager | A tool for using Zebra MX to configure devices from within an app
Microsoft .NET MAUI site | Microsoft site for its cross-platform desktop and mobile-app framework