Dragon Guard Handheld targetsDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/CodexaCP/DG_APK/llms.txt
Use this file to discover all available pages before exploring further.
net8.0-android as its active framework. The project uses conditional compilation (#if DEBUG, #if ANDROID) to switch between a test-friendly debug experience and a locked-down official release. This page covers how builds are configured, how to produce a deployable APK, and what differs between the two modes.
Target Framework
The active build target isnet8.0-android (Android API 21 minimum, no upper bound set):
Handheld.csproj
The csproj previously listed iOS, MacCatalyst, Windows, and Tizen as additional targets but they have been removed. Only
net8.0-android is actively tested and supported.Build Commands
bin/Release/net8.0-android/ (or Debug/).
Debug Build Configuration
WhenConfiguration == Debug:
| Behavior | Detail |
|---|---|
| Connection settings visible | AppExperienceService.ShowConnectionSettings = true |
| URL override allowed | AppExperienceService.AllowConnectionOverride = true |
| Debug logging enabled | builder.Logging.AddDebug() is called in MauiProgram.cs |
ExperienceMode | "TEST" |
| Assemblies embedded in APK | EmbedAssembliesIntoApk = true (rugged device compatibility) |
EmbedAssembliesIntoApk flag is set explicitly for debug Android builds because rugged Android firmware can fail with MAUI’s fast deployment override assemblies:
Handheld.csproj
Release Build Configuration
WhenConfiguration == Release:
| Behavior | Detail |
|---|---|
| Connection settings hidden | AppExperienceService.ShowConnectionSettings = false |
| URL override blocked | AppExperienceService.AllowConnectionOverride = false |
| Saved test URL cleared | Removed from Preferences on startup |
| Debug logging disabled | builder.Logging.AddDebug() not called |
ExperienceMode | "OFFICIAL" |
AppExperienceService.cs
Android-Specific Code Paths
Several code paths are Android-only, guarded by#if ANDROID:
SocketsHttpHandler — All HTTP clients use SocketsHttpHandler on Android instead of the default MAUI handler:
MauiProgram.cs
Platforms/Android/Scanning/VendorRfidScanAdapter.cs and is only compiled for Android.
AndroidKeyboardWedge — Keyboard wedge barcode input handling lives in Platforms/Android/Scanning/AndroidKeyboardWedge.cs.
Shell Navigation Excluded
AppShell.xaml is explicitly removed from compilation because it crashes on rugged Android (broken fragment startup in some OEM firmware):
Handheld.csproj
Android Manifest Permissions
The manifest (Platforms/Android/AndroidManifest.xml) declares:
| Permission | Purpose |
|---|---|
INTERNET | HTTP calls to the Dragon Guard backend |
ACCESS_NETWORK_STATE | Used by DeviceIdentityService to read WiFi MAC address |
android:usesCleartextTraffic="true" and references the network security config for HTTP dev server access.
Vendor RFID SDK (AAR Binding)
The RFID hardware SDK is included as an Android Archive:Handheld.csproj
VendorRfidScanAdapter.cs.
NuGet Dependencies
The project has a minimal dependency footprint:| Package | Version | Purpose |
|---|---|---|
Microsoft.Maui.Controls | $(MauiVersion) | MAUI framework |
Microsoft.Extensions.Http | 8.0.1 | IHttpClientFactory |
Microsoft.Extensions.Logging.Debug | 8.0.1 | Debug log output |