MAUI .NET Sample: MAUIProfilePowerMgrSample

This sample application demonstrates how to suspend and reboot a device.

Download Source

Product

EMDK For MAUI/Xamarin - 11.1

Devices

All Zebra Enterprise Mobile Computers

Overview

The MAUIProfilePowerMgrSample demonstrates how to leverage Zebra’s EMDK (Enterprise Mobility Development Kit) within a modern .NET MAUI application to programmatically manage device power actions on Zebra Android mobile computers through the MX Power Manager. This sample application showcases core functionalities of the Profile Manager API, including:

  • EMDK Profile Processing: Applies an MX Power Manager profile (PowerMgrProfile-1) at runtime through the ProfileManager API.
  • Dynamic Parameter Override: Modifies the profile at runtime using name-value pairs to change the ResetAction without editing the packaged EMDKConfig.xml.
  • Power Actions: Triggers a device suspend (sleep mode) or a reset (warm boot) based on the user's selection.
  • EMDK Initialization & Lifecycle: Creates and releases the EMDKManager in alignment with the Android app lifecycle.
  • Status Notification: Parses the asynchronous CheckXML result and reports success or parameter errors to the UI.

Requirements

To build, deploy, and run this sample, ensure the development environment and target hardware meet the following specifications:

  • Framework: .NET MAUI (.NET 10 or later)
  • Target OS: Zebra device running Android 11, 13, 14, 15 or later
  • EMDK Component: Zebra EMDK for MAUI/Xamarin 11.1 or later
  • Development Environment: Visual Studio 2026 or later configured with the .NET Multi-platform App UI development workload.
  • Permissions: com.symbol.emdk.permission.EMDK declared in the Android manifest.

Settings & Actions

Action / Setting Description
Suspend (sleep mode) Sets the ResetAction in the profile to Suspend, which places the device into low-power sleep mode when applied.
Perform reset (reboot) Sets the ResetAction in the profile to Reset, which triggers a warm boot of the device when applied.
Set Applies the selected power action to the PowerMgrProfile-1 profile via ProcessProfileAsync and displays the result.
Status Displays the EMDK initialization state and the profile application result.

Loading the Sample Application

  1. Choose a sample and click See Details.
  2. Click Download.
  3. IMPORTANT: Extract the downloaded project zip file to C:\ (or to the root of an alternate drive).
  4. Navigate to the root of the unzipped project folder and double-click the .sln file to load the project in the default IDE.

Alternatively, launch the preferred IDE and load the project via the File > Open menu.

Running the Sample

Visual Studio detects the connected USB device and displays the device name next to the Play button. Press the Play button next to the device name. The IDE builds, deploys and starts the sample app on the device.

Using the Sample App

  1. Application Launch and EMDK Verification: Launch the MAUIProfilePowerMgrSample app on the Zebra mobile computer. The application automatically performs asynchronous EMDK initialization. Confirm successful initialization via the status message.
  2. Select the action to perform:
    • Suspend (sleep mode): Places the device into low-power sleep.
    • Perform reset (reboot): Triggers a warm boot of the device. Occurs immediately once the profile is applied.
  3. Activate the selected action: Tap Set to apply the selected action. If successfully applied, the device performs the action (enters sleep mode or reboots).

Caution: The Reset option reboots the device immediately once the setting is applied.