BradyCorp.Xamarin.SDK 1.7.0

dotnet add package BradyCorp.Xamarin.SDK --version 1.7.0
NuGet\Install-Package BradyCorp.Xamarin.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.Xamarin.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.Xamarin.SDK --version 1.7.0
#r "nuget: BradyCorp.Xamarin.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.Xamarin.SDK as a Cake Addin
#addin nuget:?package=BradyCorp.Xamarin.SDK&version=1.7.0

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

BradyCorp.Xamarin.SDK

The official Xamarin 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 this package to both the iOS and Android native projects if you are using a Xamarin.Forms application. To access the library's API, use the following using statements:

- Android: "using BradySdkBindings.Droid"
- iOS: "using BradySdkBindings.iOS"

Next, intialize a BradySdk object using the constructors:

- Android: "new BradySdk(Context)"
- iOS: "new BradySdk()"

NOTE: The Xamarin 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 MUST be embedded in the Xamarin app's Resources and marked as an "AndroidResource" in the files "build properties". 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.
MonoAndroid monoandroid60 is compatible. 
Xamarin.iOS xamarinios 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 41 4/25/2024
1.3.4 804 1/23/2024
1.3.2 1,655 12/5/2023
1.3.1 1,445 11/14/2023
1.3.0 888 10/11/2023
1.2.4 1,279 8/21/2023
1.2.3 1,312 8/9/2023
1.2.2 1,481 8/8/2023
1.2.1 1,265 8/4/2023
1.2.0 1,621 8/1/2023
1.1.0 1,492 7/18/2023
1.0.4 1,254 7/14/2023
1.0.3 1,573 7/6/2023

1.7.0
- Updated Android SDK to 1.7.1
- Updated iOS SDK to 1.7.0
- Fixed bug where BWS and BWT files designed in ELM would not work in Xamarin.Android
- Fixed bug in iOS where printing multiple copies of multiple labels would not print the correct amount.
- Improved accuracy of bitmap printing
- Implemented the Parts Database changes for Xamarin.Android
- Implemented the Parts Database changes for Xamarin.iOS
- Removed all embedded fonts substantially decreasing the NuGet package size.
- Added getSubstrateLeftOffset() to printer details.
- Added getSubstrateVerticalOffset() to printer details

1.3.4
- Added the ForgetLastConnectedPrinter API method
- Added the DisconnectWithoutForget API method
- Fixed a bug where LastConnectedPrinter was not always updating as expected
- Changed the default value for printer status from "Error" to "Disconnected"

1.3.3
- Removed from nuget.org due to an incorrect code signing error.

1.3.2
- Updated Android SDK to 1.5.1
- Updated iOS SDK to 1.4.1
- Properly signed iOS SDK for distribution

1.3.1
- Updated Android SDK to 1.5.0
- Updated iOS SDK to 1.4.0
- Added API methods to Xamarin.iOS:
- AvailablePrinterUpdates
- StartBlePrinterDiscovery and StartWifiPrinterDiscovery are now separate
- HaveOwnership
- All PrinterDetail getters are now separate
- TemplateDataNames
- TemplatePartInfo
- CheckForPartMismatch

1.3.0
- Changed Xamarin.Android API to match the documentation at https://sdk.bradyid.com/brady_sdk/ under the API(Android) tab.
- Added the collated API property inside PrintOptions.
- Fixed bug where multiple copies of the same label couldn't be printed.
- Fixed bug where CutOption.EndOfLabel would not work properly.

1.2.4
- Changed the StartPrinterDiscovery() API method to 3 separate API methods.
- StartBLEPrinterDiscovery()
- StartBluetoothClassicPrinterDiscovery(bool)
- StartWifiPrinterDiscovery()
- Increased connection timeout for connecting to printers to 30 seconds.

1.2.3
- Upgraded the Base Android SDK to 1.4.1
- Fixed Disconnect() and it now returns a boolean representing success or failure.
- Overall, more reliable when connecting to printers.

1.2.2
- Fixed a Disconnection crash due to threading issues and uncaught PrinterUpdate error.
- Converted API to use traditional C# casing and turned getLastConnectedPrinter() and getPrinters() into properties.
- Fixed bug where multiple of the same printer would get added to the printer list grabbed by the Printers property.
- Fixed the Reconnect() API method.
- Fixed lastConnectedPrinter error when connecting to a BLE device.
- Fixed bug where the SDK wouldn't print multiple copies.
- Fixed M611 Edison connection bug.

1.2.1
- Fixed edge-case where ASCII characters would be trimmed off of a Barcode's value.
- Made PrinterDetail attributes public. 18 Getter methods added to the API.

1.2.0
- Changed the print() API to take an integer representing the amount of copies to print.
- Fixed multiple Data Matrix, QR Code, and Code128 encoding and rendering bugs.
- Fixed an issue where the back end could not notify the front end of a unexpected disconnection.
- Added LZ4 compression for connecting to the M611 Latimer (10 second faster connection on average).

1.1.0

- Added a new getTemplate method that allows a user to pass in a file name instead of data to retrieve a Template.
- The first functional version used by a customer

1.0.4

- Fixed internal auto-connection issues with Bluetooth Classic and Wifi connections.
- Fixed bug where the ConnectionType was not accurate.
- Fixed a typo in the returned PrinterDetails.
- Added 3 exceptions that are thrown when failing to connect to a printer.
- Now includes Debug version and .pdb for debugging.

1.0.3

- This version is consistent with the Brady SDK Flutter plugin's API and contains the same capabilities such as:
- Discovering, connecting, and printing to the M211, M611, and M511 via Bluetooth Low Energy.
- Discovering, connecting, and printing to the M611 via wireless internet (Wifi).
- Deserealizing and printing any Brady Workstation objects in a BWT file referenced at https://sdk.bradyid.com/supported_objects/
- Feeding, cutting, and disconnecting.
- Supports a version of auto connecting to your previously connected to printer via the getLastConnectedPrinterName API method.

1.0.2, 1.0.1, and 1.0.0
All versions of the Xamarin Bindings that were created, used, and tested locally.
This was done by generating a .nupkg and manually adding the package to a test project.