BradyCorp.Maui.SDK 1.7.0

dotnet add package BradyCorp.Maui.SDK --version 1.7.0
NuGet\Install-Package BradyCorp.Maui.SDK -Version 1.7.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="BradyCorp.Maui.SDK" Version="1.7.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add BradyCorp.Maui.SDK --version 1.7.0
#r "nuget: BradyCorp.Maui.SDK, 1.7.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install BradyCorp.Maui.SDK as a Cake Addin
#addin nuget:?package=BradyCorp.Maui.SDK&version=1.7.0

// Install BradyCorp.Maui.SDK as a Cake Tool
#tool nuget:?package=BradyCorp.Maui.SDK&version=1.7.0

BradyCorp.MAUI.SDK

The official MAUI wrapper for the Brady SDK allows development in C# to integrate both the iOS and Android functionalities supported by the Brady SDK's.


Setup

To start, you must add the following statement to your MAUI app's .csproj file. This statement is iOS specific and its purpose is to allow Objective-C code to translate properly into C# code inside the binding. Think of this as a permission.

<PropertyGroup>
	<MtouchExtraArgs>--require-pinvoke-wrappers=true</MtouchExtraArgs>
</PropertyGroup>

Next, you must add this package to both the iOS and Android native projects if you are using a MAUI application. To access the library's API, use the following using statements:

- Android: Implementation identical to the native Android SDK [here](https://sdk.bradyid.com/printer_discovery_android/)
- iOS: "using BradySdkMauiIOSWrapper"

Next, intialize a BradySdk object using the constructors:

- Android: Implementation identical to the native Android SDK [here](https://sdk.bradyid.com/printer_discovery_android/)
- iOS: "new BradySdk()"

NOTE: The Maui Binding MUST be implemented for both iOS and Android separately in both native projects. This is due to different constructors for each platform and alternative threading methods that need to be dealt with differently.

NOTE: Usable templates for Android MUST be embedded in Platforms>>Android>>Resources>>raw and marked as an "AndroidResource" in the files "build properties". Usable templates for iOS can be added to Resources>>Raw and marked as "BundleResource" as the Build Action. Currently, we do not support users retrieving files from their device's file system at runtime. This is due to a data conversion issue between languages in the back-end.


For both Android and iOS, you must call the .ConnectToPrinter(String) and .Print() methods from a different thread. That might look like this:

Thread connectThread = new Thread(() =>
{
    bool status = BradySdk.ConnectToPrinter(printer).Result;
    if (status)
    {
       Debug.WriteLine("Connection Status: " + status);
    }
});
connectThread.Start();
Product Compatible and additional computed target framework versions.
.NET net8.0-android34.0 is compatible.  net8.0-ios17.2 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.7.0 88 4/25/2024

1.7.0
- The first version of the MAUI wrapper that will be produced internally. This package includes everything supported in the BradyCorp.Xamarin.SDK NuGet package version 1.7.0