BradyCorp.Maui.SDK
1.7.0
See the version list below for details.
dotnet add package BradyCorp.Maui.SDK --version 1.7.0
NuGet\Install-Package BradyCorp.Maui.SDK -Version 1.7.0
<PackageReference Include="BradyCorp.Maui.SDK" Version="1.7.0" />
paket add BradyCorp.Maui.SDK --version 1.7.0
#r "nuget: BradyCorp.Maui.SDK, 1.7.0"
// 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 | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0-android34.0 is compatible. net8.0-ios17.2 is compatible. |
-
net8.0-android34.0
- Codlab.Jackson.Annotations (>= 2.8.7.1)
- Codlab.Jackson.Core (>= 2.8.7.1)
- Codlab.Jackson.Databind (>= 2.8.7.1)
- Xamarin.AndroidX.Collection (>= 1.4.0.2)
- Xamarin.AndroidX.Collection.Ktx (>= 1.4.0.1)
- Xamarin.Google.ZXing.Core (>= 3.5.2.2)
- Xamarin.GooglePlayServices.Gcm (>= 117.0.0.13)
- Xamarin.GooglePlayServices.Tasks (>= 118.0.2.6)
-
net8.0-ios17.2
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
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